Document.PageSetup Property (Word)

Office 2013 and later

Contribute to this content

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

Returns a PageSetup object that is associated with the specified document.

expression .PageSetup

expression A variable that represents a Document object.

This example sets the right margin of the active document to 72 points (1 inch).

ActiveDocument.PageSetup.RightMargin = InchesToPoints(1)

This example displays the left margin setting, in inches.

MsgBox PointsToInches(ActiveDocument.PageSetup.LeftMargin) _ 
 & " inches"