InsertPageNumbers

Syntax

InsertPageNumbers [.Type = number] [, .Position = number] [, .FirstPage = number]

Remarks

Inserts a PAGE field inside a frame in the header or footer and positions the frame as specified. The arguments for the InsertPageNumbers statement correspond to the options in the Page Numbers dialog box (Insert menu).

Argument

Explanation

.Type

Specifies where to add the page field:

0 (zero) Header

1 Footer

.Position

Specifies the position of the framed PAGE field:

0 (zero) Left

1 Center

2 Right

3 Inside (left on odd pages and right on even pages)

4 Outside (right on odd pages and left on even pages)

.FirstPage

If 1, the field is included in the header or footer on the first page.


Example

This example adds a right-aligned page number to the header and specifies that the page number not appear on the first page:


InsertPageNumbers .Type = 0, .Position = 2, .FirstPage = 0

See Also

FormatPageNumber, InsertPageField, ViewHeader