Microsoft KB Archive/291283

= How to create two page-numbering schemes in one document in Word 2003 and in Word 2002 =

Article ID: 291283

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft Office Word 2003
 * Microsoft Word 2002 Standard Edition

-



This article was previously published under Q291283





For a Microsoft Word 97 version of this article, see 155199.



For a Microsoft Word 2000 version of this article, see 212313.

IN THIS TASK

 * SUMMARY
 * Sample Document
 * Method 1: Use SEQ Fields
 * Method 2: Use PAGEREF Fields



SUMMARY
Microsoft Word does not provide a built-in method for applying two different page-numbering schemes in one document. This article describes how to create one page-numbering scheme for the whole document and another scheme for each section of the document.

back to the top

Sample Document
For example, a 10-page document has 3 sections, with the following number of pages in each section:

4 pages in section 1 (physical pages 1 through 4)

2 pages in section 2 (physical pages 5 through 6)

4 pages in section 3 (physical pages 7 through 10)

By using the following method, you can create two page-numbering schemes as follows:

The header displays the numbering scheme of:

of

The footer displays the numbering scheme of:

For example, on page 3 of section 1 (the third physical page of the total document), the header displays Page 3 of 4, and the footer displays 3. On page 2 of section 3 (the eighth physical page of the total document), the header displays Page 2 of 4, and the footer displays 8.

NOTE: This process assumes that you have a document with multiple sections, and that you are familiar with inserting field codes.

To create a numbering scheme that uses consecutive numbering throughout the document and a second numbering scheme that numbers each section beginning at 1, use either of the following methods.

back to the top

Method 1: Use SEQ Fields
 Place the following two field codes on the first page of the document:

{SEQ variable1 \h \r {SectionPages}}

{SEQ variable2 \h \r0}

NOTES:

 The \r is followed by the number zero, not the letter &quot;O&quot;. The sequence fields include the \h switch, which formats the fields as hidden. Although you can display hidden text by clicking the Show/Hide button on the standard toolbar, be sure to turn off hidden text before you print, because hidden text affects page breaks and can result in incorrect page numbering.  Place the following field codes at the beginning of each section after the first section:

{SEQ variable2 \h \r {={SEQ variable1 \c}}}

{SEQ variable1 \h \r {={SectionPages}+{SEQ variable2 \c}}}

 Position your insertion point at the top of the document. On the View menu, click Header and Footer.</li> In the header, position your insertion point where you want the page number to appear, type the word Page and a space, and then click Insert Page Number on the Header and Footer toolbar.</li> On the Insert menu, click Page Numbers, and then click Format.</li> Under Page Numbering, click Start at (1 should appear in the Start at box). Click OK.</li> Click Close.</li> Position the insertion point after the Page field, type of (include a space before and after the word &quot;of&quot;), and then on the Insert menu, click Field. Under Categories, click Numbering. Under Field Names, click SectionPages, and then click OK.</li> Click Show Next on the Header and Footer toolbar.

NOTE: You should see Header-Section 2 in the header area of the document.</li> On the Insert menu, click Page Numbers, and then click Format. Under Page Numbering, click Start at (1 should appear in the Start at box). Click OK.</li> Click Close.</li> Repeat steps 9 through 11 for each section of your document.</li> Click Show Previous on the Header and Footer toolbar until it displays Header-Section 1 in the Header section of the document. Click the Switch Between Header and Footer button on the Header and Footer toolbar.

NOTE: You should see Footer-Section 1 in the footer area of your document.</li> Place the following field code in the footer to show the page number of the total number of pages in the document:

{={SEQ variable2 \c}+{Page}}

</li> Click Close on the Header and Footer toolbar.</li></ol>

back to the top

Method 2: Use PAGEREF Fields
To create the Header section-numbering scheme, follow these steps.

NOTE: Page numbering starts at 1 for each section, and the PAGEREF field yields the number of pages in each section. Page numbering appears as &quot;Page  of  &quot; on each page, where   is the current page in the current section, and   is the number of pages in the current section. <ol> On the View menu, click Header and Footer.</li> In Header-Section 1, position your insertion point where you want the page number to appear, and then click the Insert Page Number on the Header and Footer toolbar.</li> On the Insert menu, click Page Numbers, and then click Format.</li> <li>Under Page Numbering, click Start at (1 should appear in the Start at box). Click OK. Click Close.</li> <li>On the Header and Footer toolbar, click Close.</li> <li>To insert a bookmark at the end of each section of your document, follow these steps.

NOTE: If your document has three sections, you will insert three bookmarks. <ol style="list-style-type: lower-alpha;"> <li>Select some text at the end of the last page of a section.</li> <li>On the Insert menu, click Bookmark.</li> <li>Type a bookmark name, such as Sec1 for Section 1, and then click Add.</li></ol> </li> <li>Press CTRL+HOME to return to the top of the document.</li> <li>On the View menu, click Header and Footer, and then follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Click after the Page field that you inserted in step 2, and then type of (include a space before and after the word &quot;of&quot;).</li> <li>On the Insert menu, click Field. Under Categories, click (All). Under Field Names, click PAGEREF. In the Field properties box, click the name of the bookmark that you inserted to mark the end of the current section.</li> <li>Click OK.</li> <li>Click Show Next on the Header and Footer toolbar. You should see Header-Section 2 in the header area of the document.

If Same as Previous is turned on (you will see the words Same as Previous on the right side of the dotted line surrounding the header or footer), click the Same as Previous button on the Header and Footer toolbar. The words Same as Previous will disappear from the right side of the dotted line surrounding the header or footer.</li> <li>On the Insert menu, click Page Numbers, and then click Format.</li> <li>Under Page Numbering, click Start at (1 should appear in the Start at box). Click OK. Click Close. Click Close on the Header and Footer toolbar.</li> <li>If your field codes are not turned on, press ALT+F9 to turn them on. With field codes turned on, the following code should appear

{PAGE} of {PAGEREF  \* MERGEFORMAT}

where  is the name of the bookmark that you inserted in step 6.</li> <li>Change  in the PAGEREF field to the name of the bookmark that you chose for the current section.

NOTE: To remind yourself of which section you are working on, refer to the upper-left area of the dashed border around the header.</li> <li>Repeat steps d through h for each section of your document.</li> <li>Click Close on the Header and Footer toolbar.

NOTE: You may have to update the field (click in the field, and then press F9) for it to appear correctly.</li></ol> </li></ol>

To create the footer-numbering scheme, follow these steps: <ol> <li>Position your insertion point at the top of the document. On the View menu, click Header and Footer. On the Header and Footer toolbar, click Switch Between Header and Footer.</li> <li>In Footer-Section 1, click the Insert Page Number button on the Header and Footer toolbar.</li> <li>If your field codes are not turned on, press ALT+F9 to turn them on. Delete any {PAGE} field in the footer.</li> <li>Click Show Next on the Header and Footer toolbar.

NOTE: You should see Footer-Section 2 in the footer area of the document.

If Same as Previous is turned on (you will see the words Same as Previous on the right side of the dotted line surrounding the header or footer), click the Same as Previous button on the Header and Footer toolbar. The words Same as Previous disappear from the right side of the dotted line surrounding the header or footer.</li> <li>Enter the following field in the footer of section 2

{={PAGE} + {PAGEREF  (section 1)}}

where  is the name of the bookmark that you used in the previous section.</li> <li>Click the Show Next button on the Header and Footer toolbar, and then follow these steps: <ol style="list-style-type: lower-alpha;"> <li>You should see Footer-Section 3 in the footer area of the document. If Same as Previous is turned on (you will see the words Same as Previous on the right side of the dotted line surrounding the header or footer), click the Same as Previous button on the Header and Footer toolbar. The words Same as Previous will disappear from the right side of the dotted line surrounding the header or footer.</li> <li>If your field codes are not turned on, press ALT+F9 to turn them on.</li> <li>Change the field to the following:

{={PAGE} + {PAGEREF  (section 1)} + {PAGEREF   (section 2)}}

</li></ol> </li> <li>Repeat step 6 for each section of your document.

NOTE: You will need to edit the field placed in the footer for each additional section by adding the following to the end of the existing field code between the two end braces ({})

+ {PAGEREF  (previous section  )}

where  represents the previous section number.

Therefore, if you have four sections, section 4 will look similar to the following:

{={PAGE} + {PAGEREF  (section 1)} + {PAGEREF   (section 2)} + {PAGEREF   (section 3)}}

</li> <li>Click Close on the Header and Footer toolbar.</li></ol>

back to the top

Additional query words: OfficeKBHowTo page number numbering two dual pattern different differing dissimilar multiple inf

Keywords: kbnumbering kbfield kbhowtomaster kbprint KB291283

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.