Table of contents
TOC
Collapse the table of content
Expand the table of content

Page.RulerGuides Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns a RulerGuides collection that represents gridlines used to align objects on a page.

Syntax

expression. RulerGuides

_expression_A variable that represents a Page object.

Return Value

RulerGuides

Example

This example creates horizontal ruler guides and vertical ruler guides every half inch on the first page of the active publication.

Sub SetRulerGuides() 
 Dim intCount As Integer 
 Dim intPos As Integer 
 With ActiveDocument.Pages(1).RulerGuides 
 For intCount = 1 To 16 
 intPos = intPos + 36 
 .Add Position:=intPos, Type:=pbRulerGuideTypeVertical 
 Next intCount 
 intPos = 0 
 For intCount = 1 To 21 
 intPos = intPos + 36 
 .Add Position:=intPos, Type:=pbRulerGuideTypeHorizontal 
 Next intCount 
 End With 
End Sub
© 2018 Microsoft