Update All Fields In MS Word

Sometimes you find a feature in a product that is just blatantly missing. One of those in Microsoft Word is the ability to update all the fields in the document with the latest value in a field.

I use both the built in fields e.g. Author, Version, Title and custom fields e.g. Project Code. I set the values once in the document properties and then insert the field codes in the document rather than the text. All is well. If you change the value of a field you can press F9 and all of the fields update to the latest value EXCEPT if you have used the fields in the document header or footer, these do not get updated for some reason. I would classify this as a bug, why would I not want all instances of the same field to be in sync throughout my document.

The solution is remarkably simple. Create the following macro:

Sub UpdateAll()
Dim oStory As Range
Dim oField As Field
For Each oStory In ActiveDocument.StoryRanges
For Each oField In oStory.Fields
Next oField
Next oStory
End Sub

This can be saved in your normal.dot file and will be available in all your word documents.

One thought on “Update All Fields In MS Word”

Leave a Reply

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)