Microsoft KB Archive/168922

From BetaArchive Wiki

WD: PAGEREF Field Does Not Update Page Number Reference


The information in this article applies to:

  • Microsoft Word for Windows, versions 7.0, 7.0a
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c


When you select all text in a document and press F9 to update all of the fields, the PageRef fields do not update the page numbers correctly.


This problem occurs when:

  • You insert a cross-reference (on the Insert menu) with a Reference type, such as, a Heading, and an Insert Reference To type, of Page Number.
  • You use fields that can span multiple pages, such as an AutoText field referencing a large AutoText entry.


To resolve this problem, upgrade to Microsoft Word 97.


Use one of the following methods to work around this problem.

Method 1: Update Each Field Manually

Individually select each field in the document, and then press F9 to update the selected field.

Method 2: Use the Following Macro to the Update Fields

WARNING: ANY USE BY YOU OF THE MACRO CODE PROVIDED IN THIS ARTICLE IS AT THE OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

The following example WordBasic macro updates each field in the document one field at a time.

   Sub Main()
      While NextField()
   End Sub 

Additional query words: updating updates changes last pages numbers count incorrect wrong

Keywords : kbusage kbfield
Issue type : kbprb
Technology :

Last Reviewed: November 4, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.