Update all fields including headers and footers?

N

Neil Phaby

Suggestions?
Word 2000
I need help with a macro that will update all fields in a
document when called (including all headers, footers
across all sections).
I believe it was a knowledge base article that proposed:

Public Sub UpdateAllFieldsNow()
Dim aStory As Range
Dim aField As Field
For Each aStory In ActiveDocument.StoryRanges
For Each aField In aStory.Fields
aField.Update
Next aField
Next aStory
End Sub

However this doesn't seem to get into the headers of
different document sections.
It does work with headers and footers of the first
section, however not with the header of the second section.

I need to keep "first page different" disabled, so I've
got an if statement that inserts an Autotext item on the
first page, or the contents of a bookmark on any other
page. My footers seem to work fine, but I've got them all
set to "same as previous". When I set the header to "same
as previous" the contents of section two freaks out and
flashes continuously. I think its continuously checking
the page number or something.

Any input would be appreciated - Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top