Using Expression Fields to Manipulate Page Numbering

ID: Q95886


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 97 for Windows
  • Microsoft Word for Windows NT, version 6.0
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
  • Microsoft Word 98 Macintosh Edition


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:

  • Return the current page number plus 1 (or more)


  • Return the number of pages in the document minus a specified number


  • Number the document in reverse order



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 : MACINTOSH:6.0,6.0.1,6.0.1a,98; WINDOWS:1.0,1.1,1.1a,2.0,2.0a,2.0a-CD,2.0b,2.0c,6.0,6.0a,6.0c,7.0,7.0a,97; winnt:6.0
Platform : MACINTOSH WINDOWS winnt
Issue type : kbinfo


Last Reviewed: September 29, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.