Selection.PageSetup property (Word)

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

Syntax

expression.PageSetup

expression A variable that represents a Selection object.

Example

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

See also

Selection Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.