Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Field Reference to Number of Prior Pages.
Written by Allen Wyatt (last updated June 20, 2022)
This tip applies to Word 97, 2000, 2002, and 2003
Stephanie has a document comprising two sections. The first section consists of a single title page. The second section is quite long, and at several points in the document Stephanie has text that states "...see information in the preceding X pages." She is looking for a field to use in the place of "X" so that the text always shows the number of pages prior to the page on which the field appears, without counting the title page (first section).
If the page numbering is continuous, you could just use a nested field like this:
{ = { page } - 2 }
This would give the current page in the document, minus one for the current page and minus one for the title page that you don't want to count. If page numbering restarts in section 2, you would use the following nested field instead:
{ = { page } - 1 }
If your document becomes more complex by adding additional sections (more than the two described), and each section could re-start page numbering, then the job is more difficult. The solution is to add a field that looks like this somewhere in each section:
{ sectionpages }
Select the field and format it as hidden text so that it won't show up in the final document. In addition, select the field and give it a bookmark name. These bookmarks should have names such as "section1count," "section2count," etc.
With the fields bookmarked, you now have a way to know how many pages are in each of your sections. This means that you can build the "preceding X pages" field in the following manner:
{ = { page } – 1 + { ref section1count } + { ref section2count } }
Remember that you can enter empty field braces into a document by pressing Ctrl+F9.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (498) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Field Reference to Number of Prior Pages.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Are you developing a form with Word? In some instances it is advantageous to copy whatever is entered in a form field to ...
Discover MoreTemplates are a great way to create new documents because they act as intricate patterns to what those new documents ...
Discover MoreIf you put a field into a text box, you might be surprised to find that it doesn't update when you try to update all your ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments