How do I make Word 2007 update all fields upon save? This should include fields in headers and footers.

If possible, no macros and VB code please. I want to keep the documents clean.

  • My memory is a little rusty, but I think F9 or Ctrl+F9 is involved. If you hit that before Ctrl+S, you should be fine.
    – user3463
    Oct 1, 2010 at 5:50
  • Ctrl+A then Ctrl+F9 doesn't include the headers and footers.
    – Kit
    Oct 1, 2010 at 6:06
  • This question may be of interest: superuser.com/questions/51268/…
    – Ash
    Oct 1, 2010 at 8:46
  • Typically code wouldn't be stored in an actual production document, but rather a template or external assembly using COM / Office Interop.
    – JohnZaj
    Dec 2, 2012 at 8:08

1 Answer 1


Since Ctrl+A and Ctrl+F9 will not address the headers/footers, and possibly other stories, VBA or other code will be required, which would probably be a question best fit for Stack Overflow.

VBA code might look like:

Sub updateFieldsIncludeHeadersFooters()
    Dim sec As Section
    Dim hdrftr As HeaderFooter

    ActiveDocument.Fields.Update 'address the fields in the main text story

    'now go through headers/footers for each section, update fields per range
    For Each sec In ActiveDocument.Sections
        For Each hdrftr In sec.Headers
        For Each hdrftr In sec.Footers
End Sub

I would not recommend taking over Word's Save event to run this automatically, but rather hooking it to a button or have some other way for the user to explicitly call it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.