Edit

Share via


Pane.Pages property (Word)

Returns a Pages collection that represents the pages in a document.

Syntax

expression.Pages

expression An expression that returns a 'Pane' object.

Example

The following example creates a line 0.5 inch from the upper-left corner of the active document across the page to the lower-right corner of the page, 0.5 inch from the right and bottom edges of the page.

Dim objPage As Page 
 
Set objPage = ActiveDocument.ActiveWindow.Panes(1).Pages(1) 
 
'Add new line to document 
ActiveDocument.Shapes.AddLine _ 
 InchesToPoints(0.5), _ 
 InchesToPoints(0.5), _ 
 objPage.Width - InchesToPoints(0.5), _ 
 objPage.Height - InchesToPoints(0.5) 

See also

Pane 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.