K
Karl Zuern
Hi,
I am looking for a VBA-Code to update all fields in a document.
The command "ActiveDocument.Fields.Update" does not update fields in headers
and footers and in text-fields.
In Word 2003 the following code does the job perfectly:
-------------------------------------------------------------
For Each Teil In ActiveDocument.StoryRanges
Teil.Fields.Update
While Not (Teil.NextStoryRange Is Nothing)
Set Teil = Teil.NextStoryRange
Teil.Fields.Update
Wend
Next
---------------------------------------------------------------
But in Word 2007 this code does not work. Fields in headers, footers an
text-fields will not update.
What happens here?
Does anybody have an idear how to consequently update all fields?
Regards Karl.
I am looking for a VBA-Code to update all fields in a document.
The command "ActiveDocument.Fields.Update" does not update fields in headers
and footers and in text-fields.
In Word 2003 the following code does the job perfectly:
-------------------------------------------------------------
For Each Teil In ActiveDocument.StoryRanges
Teil.Fields.Update
While Not (Teil.NextStoryRange Is Nothing)
Set Teil = Teil.NextStoryRange
Teil.Fields.Update
Wend
Next
---------------------------------------------------------------
But in Word 2007 this code does not work. Fields in headers, footers an
text-fields will not update.
What happens here?
Does anybody have an idear how to consequently update all fields?
Regards Karl.