Using Expression Fields to Manipulate Page Numbering

ID: Q95886

The information in this article applies to:

SUMMARY

This article describes how you can use the Expression field and the SUM function in conjunction with the PAGE field to manipulate page numbering in the following ways:

MORE INFORMATION

NOTE: The field braces {} used to create fields can not be typed. To create a blank field, you must either use the Field command on the Insert menu to create a specific field or press the CONTROL+F9 keys (COMMAND+F9 in Word for the Macintosh).

To quickly toggle the field codes display, press ALT+F9 (OPTION+F9 on the Macintosh).

Return the Current Page Number Plus 1 (or More)

The Expression field below adds 1 to the current page number to return the number of the next page in your document. You can use this field in your header or footer to instruct the reader to "Continue reading on page x" (where x is the result of the Expression field).

   {={PAGE}+1}

Return the Number of Pages in the Document Minus a Specified Number

The following Expression field subtracts a specified number (x) from the total number of pages in your document and displays the result:

   {={NUMPAGES}-x}

For example, if {NUMPAGES} returns 10 as the total number of pages in the document, {={NUMPAGES}-3} returns 7.

Number the Document in Reverse Order

You can insert the Expression field below in the header or footer to number the pages in your document in reverse order. This method works if your document is numbered continuously, starting at 1; it does not work if page numbering in your document is not continuous or does not start at 1.

   {={NUMPAGES}-{PAGE}}

REFERENCES

Word version 2.0 for Windows Help, "Field Types and Instructions" section, "Expression" and "Numpages" topics.

"Microsoft Word for Windows User's Reference," pages 95-96, 103

Additional query words: equal calculate calculation plus difference

Keywords          : kbfield kbformat 
Version           : 6.0 6.0.1 6.0.1a 98 | 1.x 2.x 6.0 6.0a 6.0c 7.0 7.0a 8.0
Platform          : MACINTOSH WINDOWS
Issue type        : kbinfo

Last Reviewed: September 3, 1998