D
dlowrey
Hi
I have a revision number field in the header in two sections that are not
linked. I want to update the revision numbers when I close the document.
The below code only updates the revision number in the first section.
Any ideas? Thanks in advance for taking the time to look.
SubAutoClose()
Dim oField As Field
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
For Each oField In oStory.Fields
If oField.Type = wdFieldRevisionNum Then
oField.Update
End If
Next oField
Next oStory
EndSub
I have a revision number field in the header in two sections that are not
linked. I want to update the revision numbers when I close the document.
The below code only updates the revision number in the first section.
Any ideas? Thanks in advance for taking the time to look.
SubAutoClose()
Dim oField As Field
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
For Each oField In oStory.Fields
If oField.Type = wdFieldRevisionNum Then
oField.Update
End If
Next oField
Next oStory
EndSub