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

Last reviewed: February 5, 1998
Article ID: Q97861
The information in this article applies to:
  • Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word for Windows NT, version 6.0
  • Microsoft Word 97 for Windows

SUMMARY

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

   <Page Number> of <Total Number of Pages in Section>

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 as follows:

Word 7.x, 97

In Word 7.x or Word 97, use "Page {page} of {SectionPages}" (without the quotation marks). Unlike its behavior in Word 6.x, the SectionPages field is fully implemented and works as expected within the header or footer of a document.

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

   ARTICLE-ID: Q159678
   TITLE     : WD97: Incorrect SectionPages Result w/Background Printing

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 next section.

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

   SectionPages

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.

  1. On the Insert menu, click Page Numbers.

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

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

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

    a. Select some text at the end of the last page of the section.

    b. From the Edit menu, choose Bookmark.

    c. Type a Bookmark Name, and then choose the Add button.

  5. In the header or footer for the section, position the insertion point after the PAGE field you inserted in steps 1 through 3 above, 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 appear 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
    

Word 1.x

In Word versions 1.x, there is a problem with the method described for Word version 2.x above. When you insert the PAGEREF field in the header or footer, its result is the current page number instead of the number of the page where the bookmark is located. As a result, you must use the one of the following methods in Word versions 1.x:

Method 1: Lock the PAGEREF Field

  1. Perform steps 1 through 4 of the instructions for Word version 2.0 above.

  2. Select the PAGEREF field in the header or footer and update it by pressing F9.

  3. Lock the PAGEREF field by pressing CTRL+F11 (or ALT+CTRL+F1).

    Note: If you later add pages to the section, you can update the PAGEREF field by doing the following:

    a. Unlock the PAGEREF field by selecting it and pressing

          SHIFT+CTRL+F11 (or ALT+SHIFT+CTRL+F1).
    

    b. Repeat steps 2 and 3 above.

Method 2: Use a SET Field

  1. Select some text at the end of the last page of the section.

  2. Insert a SET field that assigns a unique bookmark name to the page number of the last section. The following is the syntax of the SET field:

          {SET BookmarkName {PAGE}}
    

  3. On the View menu, be sure the Page command has no check mark. If this command does have a check mark, choose Page to switch to Normal view.

  4. On the Edit menu, click Header/Footer.

  5. Click the Options button.

  6. In the Start At box, type 1.

  7. Change the Start At field to 1.

  8. Select Header or Footer and then choose the OK button.

  9. In the header/footer pane, insert the following fields and text:

          {PAGE} of {BookmarkName \* charformat}.
    

REFERENCES

"Microsoft Word for Windows User's Guide," version 2.0, pages 747, 749

"Microsoft Word for Windows User's Reference," pages 103-104, 107


KBCategory: kbusage
KBSubcategory: kbfield
Additional query words: 1.x 2.0 2.0a 2.0a-CD 2.0b 2.0c 6.0
6.0a word7 word6 6.0c 7.0 winword winword2 word95 wrong incorrect
7.0a word97 numbering, scheme, creating, create
Keywords : kbfield kbualink97 kbusage
Version : 1.x 2.x 6.0 6.0a 6.0c 7.0 7.
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.