Page X
of Y doesn't work!
This page last
revised:
06 Jan 2024 23:47:32 -0500
.
That's right. It isn't just you.
See the following links.
http://www.word.mvps.org/FAQs/AppErrors/PageXofY.htm
and http://www.word.mvps.org/FAQs/Numbering/PageNumbering.htm
For
more on Word 2000, see http://support.microsoft.com/support/kb/articles/Q234/2/87.asp
For
more on Word 97, see: http://support.microsoft.com/support/kb/articles/Q159/6/78.ASP
Background: This is a long-standing and still-
existing bug in Word. (It may have been completely fixed in Word 2000 and I
haven't heard any complaints about it being resurrected in XP. However, XP has
it's own page numbering anomaly - all pages being numbered
0!)
The best fixes as far as Word 97 and Word 2000
go are the following configurations:
Word 97
Note that for Word 2000 SR-2 doesn't make any changes with
regard to this problem and according to Woody Leonard on Woody's Office Watch
there are significant drawbacks to SR-2, especially if you use Outlook for
email.
Word 2002-2003
Word 2002 came up with a different problem -
Page 0 - for every page!
Work-arounds
There are work- arounds. Exactly how it works and what the
work-arounds are varies depending on the version (and update) of Word that you
are using. See the above pages and the following discussions.
August 2000
update (Word 97)
Apparently
the "leap year update (a/k/a SR-3) fixes the printing problems with Page
X of Y especially for PAGE of SECTIONPAGES.
http://support.microsoft.com/support/kb/articles/Q265/3/74.ASP
September 2000 addition
It appears as though the group is getting
tired of "Page x of y" questions so I hope this is an easy one...
Everyone seems to have trouble with printing and not viewing. My problem is
with viewing. When I open my document in Page Layout mode, the page numbers
are not correct in the header. Knowing that changing the views updates
the fields, I've tried switching to another view and back in an AutoOpen macro
but this isn't working. The strange thing is that when Word is done loading
and control is returned to the user, I can rerun the exact same AutoOpen macro
and the page numbers will correct themselves.
Could it be that the first time it is
getting called the document is not completely loaded?? If so, how can I get
Word to call it later in the load sequence (..couldn't find the AutoReallyOpen
event!!).
Any help would be greatly appreciated.
Thanks in advance...
Tim
Is this the code you're using? It works when I try it:-
'________________
Sub AutoOpen()
ActiveDocument.Windows(1).View = wdNormalView
ActiveDocument.Windows(1).View = wdPageView
End Sub
'________________
If you can't get that to work then use Application.Ontime:-
'________________
Sub AutoOpen()
Application.OnTime When:=Now, Name:="UpdatePageNos"
End Sub
'________________
Sub UpdatePageNos()
ActiveDocument.Windows(1).View = wdNormalView
ActiveDocument.Windows(1).View = wdPageView
End Sub
'________________
Regards
Dave Rado, MVP
More on Page Numbering:
You can use an { IF } field to do conditional page
numbering.
Examples:
Print only on the last page:
{ IF { PAGE } = { NUMPAGES }
"I want this material on the last page." "I want this material
on every page except the last page." }
Print only on Page 5:
{ IF { PAGE } = 5 "I want this material on
5." "I want this material on every page except page 5." }
Note that the { } characters are inserted into a document using Word's
Insert Field Codes command (Ctrl+F9) or one of the other field-insertion
commands, not by typing. Charaters that look like this which are typed using
the keyboard don't work.
Page numbering is best inserted with the header and footer toolbar in a header
or footer rather than by using the Insert => Page Number... command.
More on fields
Word 2007-2013
Sometimes the simplest method is to enter the header/footer for editing and
insert the fields directly. You can enter a header or footer by
double-clicking in that part of the page (when in print preview) or under
the Insert Tab.
See
Sections, Headers/Footers and Page Numbering in Word 2007-2013 for more
on this topic.
You can insert a { PAGE } field with the key combination
Alt+Shift+P. Pressing the combination Alt+F9 will display the field codes
which can be edited. If you do that, remember to press Alt+F9 again to
toggle display back.
You can also write fields manually. For instance you could type:
page of numpages
Then select "page" and press Ctrl+F9 to make it a field. Then select "numpages"
and press Ctrl+F9. You should then see:
{ page } of { numpages }
Then select the phrase and press F9 to update the new fields. In a 17-page
document you should see:
1 of 17
Once you have this method down it is one of the quickest ways to create
fields that you know.
For those who want to be able to use Insert > Header or Insert > Footer in the
ribbon versions of Word, you can download a free Building Blocks file
containing Page X of Y headers and footers here:
Supplemental Page X of Y
Building Blocks
views since 13 April 2004