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

RulerGuides.Add Method (Publisher)

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

Adds a new ruler guide to the specified RulerGuides collection.

Syntax

expression. Add( Position, Type)

_expression_A variable that represents a RulerGuides object.

Parameters

NameRequired/OptionalData TypeDescription
PositionRequiredVariantThe position relative to the left edge or top edge of the page where the new ruler guide will be added. Numeric values are evaluated in points; strings are evaluated in the units specified and can be in any measurement unit supported by Microsoft Publisher (for example, "2.5 in").
TypeRequiredPbRulerGuideTypeThe type of ruler guide to add.

Remarks

Type can be one of these PbRulerGuideType constants.

| pbRulerGuideTypeHorizontal| | pbRulerGuideTypeVertical|

Example

The following example adds ruler guides to page one that are 0.5 inches from the left and top edges of the page.

With ActiveDocument.Pages(1).RulerGuides 
 .Add Position:="0.5 in", Type:=pbRulerGuideTypeHorizontal 
 .Add Position:="0.5 in", Type:=pbRulerGuideTypeVertical 
End With
© 2018 Microsoft