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
[quoted text clipped - 23 lines]
>
> - 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 - 23 Oct 2007 06:29 GMT
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:
[quoted text clipped - 40 lines]
>
> Joy

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID