WinWord: PAGEREF Field Does Not Work with INCLUDE Field

Last reviewed: February 6, 1998
Article ID: Q84714
The information in this article applies to:
  • Microsoft Word for Windows, versions 1.0, 1.1, 1.1a
  • Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows

SUMMARY

In Microsoft Word for Windows, if you use a PAGEREF field inside an INCLUDE field, the PAGEREF field will not reference the correct page number.

MORE INFORMATION

The PAGEREF field inserts the page number of a specific bookmark as a cross-reference. If you use this field in a document that is included as a linked document in a second document, the second document will not display the correct result of the included PAGEREF field unless the PAGEREF fields are updated individually before the entire INCLUDE field is updated. This problem occurs because of the order in which nested fields are updated. Fields are updated from the innermost field to the outermost one. When the INCLUDE field is updated, the nested PAGEREF fields update first and therefore without a proper reference. This results in incorrect page numbers.

WORKAROUND

To avoid this problem, when you insert documents into a second document using PAGEREF fields, do NOT use the Link option. This eliminates the active link between documents and causes Word to correctly display all PAGEREF field results.

In certain situations, you may want to prevent the original values of the PAGEREF fields in the source document from updating when you insert the source document into the second document. In these situations, you can lock the INCLUDE field with the \! switch to keep the PAGEREF fields from updating in the second document.

For more information on using the lock field switch:

  • Search for "Field Types and Instructions" and "Page Ref." using the Help menu in Word version 2.0 or 2.0a for Windows.

    -or-

  • Query on the following words in the Microsoft Knowledge Base:

          pageref and bookmark and field and switch
    

Steps to Reproduce Problem

  1. In a new document, type "1st bookmark" (without the quotation marks), and press ENTER.

  2. Select the new text. From the Insert menu, choose Bookmark, and type the bookmark name "b1" (without the quotation marks).

  3. On a new line, type "see page {pageref b1}" (without the quotation marks). Press ENTER. Note: The braces are created by pressing CTRL+F9.

  4. From the Insert menu, choose Break.

  5. Select Page Break, then choose the OK button.

  6. Type "2nd bookmark" (without the quotation marks), and press ENTER.

  7. Select the new text. From the Insert menu, choose Bookmark. Type the bookmark name "b2" (without the quotation marks).

  8. On a new line, type "see page {pageref b2}" (without the quotation marks), and press ENTER.

  9. Select the entire document, and press F9 to update it. From the View menu, clear the Field Codes command.

The document should display as follows:

   1st bookmark
   see page 1

   ... (page break)

   2nd bookmark
   see page 2

If this document is included in a second document using an INCLUDE field, the PAGEREF fields above will incorrectly display the result of the last page in the document rather than the page the bookmarks are actually located on.

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

REFERENCES

"Microsoft Word for Windows User's Guide," version 2.0, pages 746, 749


KBCategory:
KBSubcategory:
Additional query words: 1.0 1.10 1.10a 2.0 2.0a 2.0a-CD 2.0b
word6 2.0c 6.0 6.0a 6.0c winword winword2
Version : 1.x 2.x 6.0 6.0a 6.0c
Platform : 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 6, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.