LayoutGuides Object (Publisher)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents the measurement grid that appears superimposed on publication pages as an aid to laying out design elements.

Use the LayoutGuides property of the Document object to return a LayoutGuides object. Use the LayoutGuide object's margin properties and Rows and Columns properties to set how many rows and columns are displayed in the layout guides and where they appear on a page.

This example sets the margins of the active presentation to two inches.

With ActiveDocument.LayoutGuides 
 .MarginTop = Application.InchesToPoints(Value:=2) 
 .MarginBottom = Application.InchesToPoints(Value:=2) 
 .MarginLeft = Application.InchesToPoints(Value:=2) 
 .MarginRight = Application.InchesToPoints(Value:=2) 
End With
Show: