Microsoft KB Archive/189238

{|
 * width="100%"|

WD: Page Numbering in "Page of Total Pages in Section" Format

 * }

Q189238

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
 * Microsoft Word for Windows NT, version 6.0
 * Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
 * Microsoft Word for Windows, versions 7.0, 7.0a

-

SUMMARY
This article describes how you can number the pages of a section in the following format:

" of "

MORE INFORMATION
This numbering sequence is implemented differently depending on the version of Word for Windows you are using. Follow the directions that correspond to the version you have installed.

Word 7.x
To add a Page X of Y "Page {Page} of {SectionPages}" numbering scheme, follow these steps:


 * 1) On the View menu, click Header And Footer. In the header or footer, type Page and press the SPACEBAR.
 * 2) On the Insert menu, click Field.
 * 3) Under Categories, click (All). Under Field Names, click Page, and then click OK.
 * 4) Immediately press the SPACEBAR once. Type of and press the SPACEBAR again.
 * 5) On the Insert menu, click Field.
 * 6) Under Categories, click (All). Under Field Names, click SectionPages, and then click OK.

For additional information about the SectionPages field, please see the following article in the Microsoft Knowledge Base:

"Q155199 WD: How to Create Two Page Numbering Schemes in One Document"

Word 6.x
Word 6.x ships with the SectionPages field, which returns the total number of pages in a section. However, the SectionPages field is not fully implemented and does not return the correct number of pages in a section if you insert the field in the header or footer. To return the number of pages in a section in Word 6.x, use the steps described in the "Word 2.x" section of this article.

For more information on the SectionPages field, query in the Microsoft Knowledge Base on the following word:

"SectionPages" For additional information, please see the following article in the Microsoft Knowledge Base:

"Q108482 WD6X: Incorrect SECTION and SECTIONPAGES Field Results"

Word 2.x
Use the PAGEREF field to obtain the number of pages in the current section. The following instructions insert page numbers in the header or footer of your document. Page numbering starts at 1 for each section, and the PAGEREF field yields the number of pages in each section. Page numbering appears as "Page X of Y" on each page, where X is the current page in the current section, and Y is the number of pages in the current section.

To insert "Page X of Y," follow these steps:

On the Insert menu, click Page Numbers.

Select the desired Position and Alignment settings, and then click the Format button.

Select the Start At option (1 should appear in the Start At list), and then click OK.

Repeat the following instructions in each section of your document to insert a bookmark at the end of the section:

 Select some text at the end of the last page of the section. On the Edit menu, click Bookmark. Type a Bookmark Name, and then click Add.

In the header or footer for the section, position the insertion point after the PAGE field you inserted in steps 1 through 3, and insert the following field and text (include the space before "of")

"of {PAGEREF BookmarkName}" where BookmarkName is the name of the bookmark you inserted at the end of the current section.

In field code view, the header or footer appears as follows:

"{ PAGE } of { PAGEREF BookmarkName }" For example, if the current section contains 11 pages, the following appears in the header or footer on page 3:

"3 of 11"