Russ
Mon Oct 22 22:29:49 PDT 2007
Joy,
In response to this subroutine, Jean-Guy offered the link below for more
information.
Sub UpdateAllFields()
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType <> wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
End Sub
--------Quote
If the first story of a the header/footer story range is totally blank, e.g.
the main header of the first section has never been set, this code will not
update the headers/footers in the following sections.
For a workaround, See
http://word.mvps.org/faqs/customization/ReplaceAnywhere.htm
Jean-Guy Marcil - Word MVP
---------UnQuote
> On Oct 21, 2:16 am, "Tony Jollans" <My forename at my surname dot com>
> wrote:
>> Outside of the header and footer it won't automatically update as you add
>> pages. You must explicitly update it to see the correct value on screen. It
>> will, however update itself if you Print (or Print Preview) it.
>>
>> --
>> Enjoy,
>> Tony
>>
>> <j...@valleywater.org> wrote in message
>>
>> news:1192823886.369481.276020@q5g2000prf.googlegroups.com...
>>
>>
>>
>>> I used autotexts for automatic page numbering that appear outside the
>>> header/footer area:
>>
>>> { page} of { numpages}
>>
>>> And it worked . . . initially. However, the "numpages" field won't
>>> update even though more pages added. I tried switching the view mode,
>>> closing and re-opening the file, etc., but still it won't update. Did
>>> I miss any step, or is there any way to fix this problem?
>>
>>> PLEASE HELP!
>>
>>> Joy- Hide quoted text -
>>
>> - Show quoted text -
>
> Thank you for your response!
>
> You wrote:
> Outside of the header and footer it won't automatically update as you
> add
> pages. You must explicitly update it to see the correct value on
> screen. It
> will, however update itself if you Print (or Print Preview) it.
>
> However, my customer is requesting to make that happen automatically,
> without switching views/or having to print. Is that possible by
> macros/Visual Basic programming?
>
> Joy
>
--
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID