Using Expression Fields to Manipulate Page Numbering

Last reviewed: February 2, 1998
Article 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

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
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


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 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.