View Single Post
  #2   Report Post  
Posted to microsoft.public.word.formatting.longdocs
Jezebel Jezebel is offline
external usenet poster
 
Posts: 1,384
Default Updating fields in section headers

To update fields in headers only --

Dim pRange as Word.Range
Set pRange = activedocument.StoryRanges(wdPrimaryHeaderStory)
Do
pRange.Fields.Update
set pRange = pRange.NextStoryRange
Loop until pRange is nothing


You will need to be more sophisticated if you have different firstpage or
left/right headers.







"Tallbob29" wrote in message
...

I'm working with a large document that I inherited. It has about 150
section breaks (due to flipping back and forth between portrait for
text and landscape for figures). Due to the different orientations,
none of these section breaks are set to "same as previous".

In the header of each is a field that points to a custom document
property. When I change the document property, the fields in the
headers don't automatically update.

Is there a way for me to command Word to update this field in in the
header in all 150 sections? (I'll take either automatic or manual
methods.)

I don't want to update each one individually. (Mind numbing!)
I tried "select all" then F9. The "select all" didn't include the
headers.
I don't want to update all the fields in the entire document. (There
are many others that I don't want to update, and it takes forever
anyway.)

Any other ideas?

Thanks in advance.




--
Tallbob29