“Page X of Y” gives wrong numbers

Article contributed by Dave Rado and Suzanne Barnhill

When you use the "Page X of Y" AutoText in your header or footer, and it seems to work okay, but when you re-open or print the document, you see "Page 1 of 1," "Page 2 of 2," and so on, you have the "Page X of Y" bug.

Update: According to the Microsoft Knowledgebase, The NUMPAGES field may not print as expected after you install Word 2000 Service Pack 3.  The article says "This issue is fixed in the Word 2000 post-Service Pack 3 Hotfix Package that is dated July 12, 2004."  For additional information, click the following link: http://support.microsoft.com/?kbid=873321.

If you are using Word 2000 or later

Upgrade to the latest Service Release for your product.  To do this, click here and then look for and click the Office Update -- Check for updates link.  These free upgrades can also be obtained from Microsoft on CD. Note: Some versions of Office on some operating systems will require you to put the original product CD from which you installed Office in during installation.  Try the update: if you get a message saying it cannot install because you have not provided the original CD, unfortunately there is nothing you can do about this: you need to find the original CD or buy a new copy.

Work-arounds When the Updates Do Not Solve the Problem

The upgrades do not fix the problem in all cases or for all documents (and we do not know why).  If you have applied the latest service release for your version of Word, and you still have the Page X of Y problem, any of the solutions mentioned below will work for you:  

 

 

  1.  Reversing the print order (under Tools + Options + Print)
    Works for almost everyone but is a major pain.  If your printer has its own “reverse print order” hardware setting, you can, in effect, reverse twice, thus saving yourself the trouble of re-collating; but this is hardly practical if it's a network printer. 
  2. Reversing the print order is a boon to users whose printers output face up (and hence in reverse order), but such users usually already have that option set and consequently don't experience the Page X of Y problem to begin with!
  3. Switch into Print Preview and back, twice if necessary. Make sure you have the “Update fields” option checked on the Print tab of Tools | Options
    Works for some but not practical in a corporate environment – it's too easy to forget to do it.
  4. In addition to (2)., try clearing the check box for “Background printing” on the same tab.
    Works for more people than (2) on its own. 
  5. Some users report that hiding nonprinting characters (toggle the Show/Hide button to Hide) helps
    Same comment as (2).
  6. Instead of using a NUMPAGES field, use a PAGEREF field that references a bookmark at the very end of the document.
  7. Or if you're using the SECTIONPAGES field, replace each with a PAGEREF field that references a bookmark at the very end of that section.
  8. You need an amazing level of self-discipline to remember to redefine the bookmark's position whenever you add any text at the end of the document or section.
  9. Write an Add-in that intercepts the FilePrint and FilePrintDefault commands and implements (5). automatically.
    For a corporate environment,  this was really the only practical solution prior to the release of Service Release 1.

Word 97

Whereas in Word 2000, prior to Service Release 1, the numbers displayed correctly but printed incorrectly, in Word 97, it is usually the other way around – the numbers print fine for most people but display on every page as Page x of 1 – that is, provided you use the NUMPAGES field.  The SECTIONPAGES field didn't work in Word 97 for most people up to SR-2, even when printing.

To fix the printing problem, you can upgrade to the Word 97 'Leap Year Fix' (so-called – it's really SR-3) – but that won't fix the screen display problem.

The most reliable method of fixing the display problem is to switch to Normal View and back to Page Layout View.  You can even write a little macro to do this automatically whenever a document is opened:

Sub AutoOpen()

Application.ScreenUpdating = False

With ActiveDocument.Windows(1).View

   .Type = wdNormalView

   .Type = wdPageView

End With

Application.ScreenUpdating = True

End Sub

Of course that won't help when the user adds more text and the document goes onto more pages – but you could create an “Update page numbers” button on the toolbar to run the same macro.

If you are one of the unfortunate few who experience the problem in Word 97 when printing;  or if you are using SECTIONPAGES fields in Word 97, then while you're waiting for the 'Leap Year Fix', or if you are using a language version of Word 97 for which the upgrade is not yet available, you will need to resort to one of the workarounds described in the table above.

Microsoft Knowledge Base articles

Word 2000