PrevPage, PrevPage()

Syntax

PrevPage

PrevPage()

Remarks

The PrevPage statement scrolls back one page in page layout view without moving the insertion point (the same as clicking the Page Back button at the bottom of the vertical scroll bar in page layout view). If you want to move the insertion point after scrolling, include a StartOfWindow statement following PrevPage in your macro.

PrevPage scrolls from the current location on one page to the same relative location on the previous page. To scroll to the beginning of the previous page regardless of what portion of the current page appears, use the instruction EditGoTo .Destination = "p-1" instead of PrevPage. Note, however, that EditGoTo also moves the insertion point.

The PrevPage() function behaves the same as the statement and also returns the following values.

Value

Explanation

0 (zero)

If there is no previous page (in other words, if the document doesn't scroll)

1

If the document scrolls


Note

PrevPage and PrevPage() are available only in page layout view and generate an error if run in another view.

Example

This example ensures the document is in page layout view, scrolls to the previous page, and moves the insertion point to the top of the window:


ViewPage
PrevPage
StartOfWindow

See Also

EditGoTo, NextPage, PageUp, ViewPage, VPage