Selection.PageSetup Property (Word)

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.

Returns a PageSetup object that's associated with the specified selection.

expression .PageSetup

expression A variable that represents a Selection object.

This example sets the header and footer distance to 18 points (0.25 inch) from the top and bottom of the page, respectively. This formatting change is applied to the section that contains the selection.

With Selection.PageSetup 
 .FooterDistance = 18 
 .HeaderDistance = 18 
End With
Show: