hi all,
it’s time to ask my first question.
i’ve got the following field in my footer:
{IF {PAGE}=
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » page field update (xp sp2)
Hi Pieter:
I can’t check since I have Word 2000 and I don’t have an explanation as to why the field doesn’t update on printing, but does on Print Preview. Do you have any add-ins that intercept the Print command? If you start Word from the command line, “winword.exe /a”, does it work correctly?
Incidentally, I think there’s something wrong with the syntax, as posted. The quotes seem to be spaced wrong. It doesn’t print on the second page, only the first. Could you try:
{ IF { Numpages } > 1 “{ page }/{ numpages }” “” }
or am I missing your intention?
Cheers,
Hi Pieter:
I can’t check since I have Word 2000 and I don’t have an explanation as to why the field doesn’t update on printing, but does on Print Preview. Do you have any add-ins that intercept the Print command? If you start Word from the command line, “winword.exe /a”, does it work correctly?
Incidentally, I think there’s something wrong with the syntax, as posted. The quotes seem to be spaced wrong. It doesn’t print on the second page, only the first. Could you try:
{ IF { Numpages } > 1 “{ page }/{ numpages }” “” }
or am I missing your intention?
Cheers,
Remember that weird exploit that could import a document into a INCLUDETEXT field inside an IF field that rendered the process invisible? I wonder if Microsoft’s patch for that somehow messed up the recalculation inside your field? If you Shift+F9 on the outer field and update the inner IF field, does it give the correct result? Do you have to drill down further inside?
Just a stray thought…
thanks Phil & Jefferson,
my explanation of the field logic was not complete & i should’ve used Jefferson’s utilty to paste the field code correctly to the lounge without syntax errors – so here goes:
{IF { PAGE } = 1 “{ IF { NUMPAGES } > 1 “{ PAGE }/{ NUMPAGES }.” “”}“}
the field in itself works correctly, it only prints pages/numpages in the footer of the first page only, if there is more than 1 page. on subsequent pages, the page/numpages result is displayed in the header instead with another field, which does update correctly – but it only checks the page field and not the numpages field.
if i run without add-ins, i still experience the same problem – the field will not update if the second page gets deleted
the patch for the includetext field exploit has not been installed, it is a plain sp2.
so it looks like microsoft’s claim that the numpages field updating issue has definitively been resolved since word 97 “sr3” (the y2k update), is false.
if you want to have a look at an example document i can send it offline.
Hi Pieter,
I’m running Word 2K, with only SR1 at the moment, and both your field and Jefferson’s works fine. They do different things though:
. Yours puts the 1st page # and numpages on the first page only, but only if there is more than one page
. Jefferson’s puts the 1st page # and numpages on all pages, but only if there is more than one page
In both cases, numpages updates as pages are added/deleted, and both fields disappear if all except the 1st page is deleted.
Cheers
PS: In your field’s case, {PAGE}/{NUMPAGES} could be reduced to 1/{NUMPAGES}, since the output only ever appears on page #1.
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
thanks macropod and Phil,
macropod you’re right, as this field will only be displayed on the first page, i can reduce it to 1/{ numpages }
i’m actually glad this glitch cannot be reproduced on other versions of word, so it seems only 2k2sp2 could be affected in theory (for completeness, it is a dutch version build 10.0.4219), lest the document has corrupted. in that case i’ve got some work to do, because it served as a base template with which i created around 120 other templates which exhibit the same problem.
Phil, sending you the document offline.
I have just tested
{IF { PAGE } = 1 “{ IF { NUMPAGES } > 1 “{ PAGE }/{ NUMPAGES }.” “”}”}
in the page footer on Word 2002 SP2 and it works in the way I would expect. If there is more than 1 page then it displays Page 1/x on the first page. If I delete text to reduce to one page and update fields then it clears again.
StuartR
hi Stuart,
thanks for testing with word 2002 sp2.
i’ve also retested and did the following.
i created a second page and the fields update automatically without any intervention to display 1/2 on the first, and 2/2 on the second.
i created a third page and fields update automatically without any intervention to display 1/3, 2/3 and 3/3.
now for something intresting : if i delete the third page, the fields update automatically without intervention to display 1/2 and 2/2. this is what i understand is normal and standard behavior of word.
if i now delete the second page, the field will not update and keeps displaying 1/2, although there no longer is a second page. if i then print, the result 1/2 will be printed. i have to go into printpreview, or go into the footer to update the field, only then the field result will be adjusted to display an empty result. this is _an error_, either the document became corrupted somehow, or this version of word reintroduced the long standing numpages update bug that has only been solved since word 97 sr3.
Hi Pieter:
I received your document & tested it in Word 2000. I could find no problem. The field updated the way it should. I noticed one thing only & found that it ocurred in newly created documents with similar fields also. If I added a page, the field updated immediately, whether I added one or two pages. If I deleted a page AND had the page one footer in view at the same time, the field display didn’t update. However, if I scrolled so the footer was out of view & then back into view, the footer field was updated. I concluded that this was a screen redraw issue & not a Word problem.
I found that printing the document also refreshed the field. This is one of those fields that should update in the header/footer regardless of whether Tools/Options/Print/Update fields is checked or not. And it shouldn’t matter if Tools/Options/General/Background repagination is checked. Perhaps if you post the document here (after removing anything confidential), Stuart or one of the others who have Word 2002 could test it.
Out of curiosity, along the lines of Jefferson’s thoughts, what is your registry setting for
HKEY_CURRENT_USERSoftwareMicrosoftOffice10.0WordOptionsFieldCalcSecurityLevel
Does changing it to 0 make any difference? (Don’t forget to set it back, if you want).
I know you’re away from the Lounge today, so I’ll send this message to you offline also.
hi Phil,
thanks so much for having a look.
i’ll guess i have to live with it. it is not too big a problem since it will only occur when a document is reduced from 2 pages to 1 page, either through reformatting or after correcting an error. this will only rarely happen.
i’ve checked and rechecked, printing does not refresh the field, printpreview does.
i’ve also verified again that the field patch has not been installed and therefore there is no FieldCalcSecurityLevel registry key.
Strange.
If I add and then delete a second page then the field does not clear until I double click the footer to edit it, at which point it updates correctly.
I have Tools > Options > Print set to Update Fields, but the single page document still printed with 1/2 at the bottom.
When it is in this state (single page showing 1/2) I can issue the VBE immediate command
ActiveDocument.Sections(1).Footers(1).Fields.Update
followed by
? ActiveDocument.Sections(1).Footers(1).Range.Text
And it shows 1/2
If I then double click on the footer to open it then it starts behaving correctly.
StuartR
Strange.
If I add and then delete a second page then the field does not clear until I double click the footer to edit it, at which point it updates correctly.
I have Tools > Options > Print set to Update Fields, but the single page document still printed with 1/2 at the bottom.
When it is in this state (single page showing 1/2) I can issue the VBE immediate command
ActiveDocument.Sections(1).Footers(1).Fields.Update
followed by
? ActiveDocument.Sections(1).Footers(1).Range.Text
And it shows 1/2
If I then double click on the footer to open it then it starts behaving correctly.
StuartR
hi Phil,
thanks so much for having a look.
i’ll guess i have to live with it. it is not too big a problem since it will only occur when a document is reduced from 2 pages to 1 page, either through reformatting or after correcting an error. this will only rarely happen.
i’ve checked and rechecked, printing does not refresh the field, printpreview does.
i’ve also verified again that the field patch has not been installed and therefore there is no FieldCalcSecurityLevel registry key.
Hi Pieter:
I received your document & tested it in Word 2000. I could find no problem. The field updated the way it should. I noticed one thing only & found that it ocurred in newly created documents with similar fields also. If I added a page, the field updated immediately, whether I added one or two pages. If I deleted a page AND had the page one footer in view at the same time, the field display didn’t update. However, if I scrolled so the footer was out of view & then back into view, the footer field was updated. I concluded that this was a screen redraw issue & not a Word problem.
I found that printing the document also refreshed the field. This is one of those fields that should update in the header/footer regardless of whether Tools/Options/Print/Update fields is checked or not. And it shouldn’t matter if Tools/Options/General/Background repagination is checked. Perhaps if you post the document here (after removing anything confidential), Stuart or one of the others who have Word 2002 could test it.
Out of curiosity, along the lines of Jefferson’s thoughts, what is your registry setting for
HKEY_CURRENT_USERSoftwareMicrosoftOffice10.0WordOptionsFieldCalcSecurityLevel
Does changing it to 0 make any difference? (Don’t forget to set it back, if you want).
I know you’re away from the Lounge today, so I’ll send this message to you offline also.
hi Stuart,
thanks for testing with word 2002 sp2.
i’ve also retested and did the following.
i created a second page and the fields update automatically without any intervention to display 1/2 on the first, and 2/2 on the second.
i created a third page and fields update automatically without any intervention to display 1/3, 2/3 and 3/3.
now for something intresting : if i delete the third page, the fields update automatically without intervention to display 1/2 and 2/2. this is what i understand is normal and standard behavior of word.
if i now delete the second page, the field will not update and keeps displaying 1/2, although there no longer is a second page. if i then print, the result 1/2 will be printed. i have to go into printpreview, or go into the footer to update the field, only then the field result will be adjusted to display an empty result. this is _an error_, either the document became corrupted somehow, or this version of word reintroduced the long standing numpages update bug that has only been solved since word 97 sr3.
I have just tested
{IF { PAGE } = 1 “{ IF { NUMPAGES } > 1 “{ PAGE }/{ NUMPAGES }.” “”}”}
in the page footer on Word 2002 SP2 and it works in the way I would expect. If there is more than 1 page then it displays Page 1/x on the first page. If I delete text to reduce to one page and update fields then it clears again.
StuartR
thanks macropod and Phil,
macropod you’re right, as this field will only be displayed on the first page, i can reduce it to 1/{ numpages }
i’m actually glad this glitch cannot be reproduced on other versions of word, so it seems only 2k2sp2 could be affected in theory (for completeness, it is a dutch version build 10.0.4219), lest the document has corrupted. in that case i’ve got some work to do, because it served as a base template with which i created around 120 other templates which exhibit the same problem.
Phil, sending you the document offline.
Hi Pieter,
I’m running Word 2K, with only SR1 at the moment, and both your field and Jefferson’s works fine. They do different things though:
. Yours puts the 1st page # and numpages on the first page only, but only if there is more than one page
. Jefferson’s puts the 1st page # and numpages on all pages, but only if there is more than one page
In both cases, numpages updates as pages are added/deleted, and both fields disappear if all except the 1st page is deleted.
Cheers
PS: In your field’s case, {PAGE}/{NUMPAGES} could be reduced to 1/{NUMPAGES}, since the output only ever appears on page #1.
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Hi Pieter:
I tried your field in Word 2000 SR-3. It works as it should. We need someone who has Word 2002 to test it to see if it’s something on your machine or a bug. It wouldn’t be the first time that something was fixed in an earlier version & reappeared in a later version.
Maybe it’s just the document. I’d be happy to look at it if you’d like to send it offline.
Cheers,
Hi Pieter:
I tried your field in Word 2000 SR-3. It works as it should. We need someone who has Word 2002 to test it to see if it’s something on your machine or a bug. It wouldn’t be the first time that something was fixed in an earlier version & reappeared in a later version.
Maybe it’s just the document. I’d be happy to look at it if you’d like to send it offline.
Cheers,
thanks Phil & Jefferson,
my explanation of the field logic was not complete & i should’ve used Jefferson’s utilty to paste the field code correctly to the lounge without syntax errors – so here goes:
{IF { PAGE } = 1 “{ IF { NUMPAGES } > 1 “{ PAGE }/{ NUMPAGES }.” “”}“}
the field in itself works correctly, it only prints pages/numpages in the footer of the first page only, if there is more than 1 page. on subsequent pages, the page/numpages result is displayed in the header instead with another field, which does update correctly – but it only checks the page field and not the numpages field.
if i run without add-ins, i still experience the same problem – the field will not update if the second page gets deleted
the patch for the includetext field exploit has not been installed, it is a plain sp2.
so it looks like microsoft’s claim that the numpages field updating issue has definitively been resolved since word 97 “sr3” (the y2k update), is false.
if you want to have a look at an example document i can send it offline.
Remember that weird exploit that could import a document into a INCLUDETEXT field inside an IF field that rendered the process invisible? I wonder if Microsoft’s patch for that somehow messed up the recalculation inside your field? If you Shift+F9 on the outer field and update the inner IF field, does it give the correct result? Do you have to drill down further inside?
Just a stray thought…
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.