Page related procedures in class Pane (Word VBA)

This page presents procedures from class Pane related to the theme Page: Pages and PageScroll

Pages

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

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) 

PageScroll

Scrolls through the specified window page by page.

The PageScroll method is available only if you are in print layout view or Web layout view. This method does not affect the position of the insertion point. If Down and Up are both specified, the window is scrolled by the difference of the arguments. For example, if Down is 2 and Up is 4, the window is scrolled up two pages.

Syntax : expression.PageScroll (Down, Up)

ActiveDocument.ActiveWindow.View.Type = wdPrintView 
ActiveDocument.ActiveWindow.ActivePane.PageScroll Up:=1

Arguments

The following arguments are optional

Down (Long) - The number of pages to be scrolled down. If this argument is omitted, this value is assumed to be 1.

Up (Long) - The number of pages to be scrolled up.