WinWord: PAGEREF Field Does Not Work with INCLUDE Field (84714)



The information in this article applies to:

  • Microsoft Word for Windows 1.0
  • Microsoft Word for Windows 1.1
  • Microsoft Word for Windows 1.1a
  • Microsoft Word for Windows 2.0
  • Microsoft Word for Windows 2.0a
  • Microsoft Word for Windows 2.0b
  • Microsoft Word for Windows 2.0c
  • Microsoft Word for Windows 6.0
  • Microsoft Word for Windows 6.0a
  • Microsoft Word for Windows 6.0c
  • Microsoft Word for Windows 95
  • Microsoft Word for Windows 95 7.0a
  • Microsoft Word 97 for Windows

This article was previously published under Q84714

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, and press ENTER.
  2. Select the new text. From the Insert menu, choose Bookmark, and type the bookmark name b1.
  3. On a new line, type see page {pageref b1}. 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, and press ENTER.
  7. Select the new text. From the Insert menu, choose Bookmark. Type the bookmark name b2.
  8. On a new line, type see page {pageref b2}, 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

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB84714