Microsoft KB Archive/190550

= WD: How to Create Two-Page Numbering Schemes in One Document =

Article ID: 190550

Article Last Modified on 8/18/2005

-

APPLIES TO


 * Microsoft Word 6.0 Standard Edition
 * Microsoft Word 6.0a
 * Microsoft Word 6.0c
 * Microsoft Word 6.0 for Macintosh
 * Microsoft Word 6.01 for Macintosh
 * Microsoft Word 6.01 for Macintosh
 * Microsoft Word 95 Standard Edition
 * Microsoft Word 95a

-



This article was previously published under Q190550





SUMMARY
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 entire document and another scheme for each section of the document.

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

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

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

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

Using the instructions in this article, you can create two page numbering schemes to resemble the following:

The header will display the numbering scheme of:

 of 

The footer will display the numbering scheme of:



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



MORE INFORMATION
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.

Method 1: To Create a Numbering Scheme by Using SEQ Fields
  Place the following two field codes on the first page of the document: {SEQ variable1 \h \r {SectionPages} }

{SEQ variable2 \h \r0} NOTE: the \r is followed by the number zero, not the letter "O."   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, and on the View menu, click Header And Footer. In the Header, position your insertion point where you want the page number, type the word Page and a space, and then click the Insert Page Number button on the Header And Footer toolbar. 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), and then click OK twice.</li> Position the insertion point after the Page field, type " of " (without the quotation marks, and including the spaces before and after the word "of"), and on the Insert menu, click Field. Under Categories, click (All). 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.) 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), and then click OK twice.</li> Repeat step 8 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>

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, you should turn hidden text off before you print because hidden text affects page breaks and can result in incorrect page numbering.

Method 2: To Create a Numbering Scheme by Using PAGEREF Fields
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 create the header numbering scheme, follow these steps:

<ol> On the View menu, click Header And Footer.</li> In Section 1, position your insertion point where you want the page number, and then click the Insert Page Number button 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), and then click OK twice, and then click Close on the Header and Footer toolbar.</li> In each section of your document, use the following steps to insert a bookmark at the end of the section (for example, if you have 7 sections, repeat these steps 7 times, once for each section): <ol style="list-style-type: lower-alpha;"> Select some text at the end of the last page of the section.</li> On the Edit menu, click Bookmark.</li> Type a Bookmark Name, such as Sec1 for Section 1, and then click Add.</li></ol> </li> <li>On the View menu, click Header And Footer, and then follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Starting at Section 1 of your document, position the insertion point after the Page field that you inserted in step 2, and then type " of " (without the quotation marks, and including the spaces before and after the word "of").</li> <li>On the Insert menu, click Field. Under Categories, click (All). Under Field Names, click PAGEREF, click Options, click the Bookmarks tab, select the name of the bookmark you inserted to mark the end of the current section, and then click Add To Field.</li> <li>Click OK twice.</li> <li>Click Show Next on the Header And Footer toolbar. (NOTE: 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 to turn it off.

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. Under Page Numbering, click Start At (1 should appear in the Start At box), and then click OK twice.</li> <li> If field codes are not turned on, press ALT+F9 to turn them on. With field codes turned on, the following code will appear {PAGE} of {PAGEREF BookmarkName \* MERGEFORMAT} where BookmarkName is the name of the bookmark you inserted in step 5. </li> <li>Change the BookmarkName within the PAGEREF field to the name of the bookmark for the respective Section.</li> <li>Repeat steps d and f for each section of your document.</li> <li>Click Close on the Header And Footer toolbar.

NOTE: You may need to update the field (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 and on the View menu, click Header And Footer. Click the Switch Between Header and Footer button on the Header And Footer toolbar.</li> <li>In Section 1, click the Insert Page Number button on the Header And Footer toolbar.</li> <li>Click Show Next on the Header And Footer toolbar. (NOTE: 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 to turn it off.

The words Same As Previous will disappear from the right side of the dotted line surrounding the header or footer.</li> <li>If field codes are not turned on, press ALT+F9 to turn them on. With field codes turned on, delete any {PAGE} field in the footer.</li> <li> Enter the following field into the footer of section 2: {={PAGE} + {PAGEREF BookmarkName (section 1)}} NOTE: The BookmarkName should be the PREVIOUS Section's BookmarkName. </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 Header-Section 3 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 to turn it off.

The words Same As Previous will disappear from the right side of the dotted line surrounding the header or footer.</li> <li>If field codes are not turned on, press ALT+F9 to turn them on.</li> <li> With field codes turned on, change the field to the following: {={PAGE} + {PAGEREF BookmarkName (section 1)} + {PAGEREF BookmarkName (section 2)}} </li></ol> </li> <li> Repeat step 6 for each section of your document.

NOTE: You will need to edit the field placed into the footer for each additional section by adding the following to the end of the existing field code between the two end braces ({}): + {PAGEREF BookmarkName (previous section x)} NOTE: x represents the PREVIOUS section number.

For example, Section 4 of our example would be: {={PAGE} + {PAGEREF BookmarkName (section 1)} + {PAGEREF BookmarkName (section 2)} + {PAGEREF BookmarkName (section 3)}} </li> <li>Click Close on the Header And Footer toolbar.</li></ol>

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

Keywords: kbhowto kbfield KB190550

-

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

© Microsoft Corporation. All rights reserved.