Please Note: This article is written for users of the following Microsoft Word versions: 2007 and 2010. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Field in Footer Won't Update.

Field in Footer Won't Update

by Allen Wyatt
(last updated February 12, 2016)

10

Christina has a version number that is on the title page of her document, and she updates it manually. She uses a field in the footer of the document to reference this version number. When she updates the version number on the title page, it doesn't update on the footer, even if she presses Ctrl+A and then presses F9. Christina wonders why the field isn't updating.

The reason that this doesn't work is because Word utilizes the concept of "layers" or "stories" in putting a document together. Your main document text is on one layer and other elements are on different layers, such as the graphics layer or the header/footer layer. When you are in the main document an you press Ctrl+A, you are selecting all the text in the main document layer, and the subsequent action (pressing F9) affects only what you've selected. If you want to affect the fields in the header or footer, you need to place the insertion point within the header or footer and then use Ctrl+A.

There are easier ways, however. One easy way is to use a macro to update all fields, regardless of where they are located. How you do this has been covered in other issues of WordTips, but here is a rather simple macro that will do the updating:

Sub UpdateAllFields1()
    Dim doc As Document
    Dim sRange As Range
    Dim sField As Field

    Set doc = ActiveDocument
    For Each sRange In doc.StoryRanges
        For Each sField In sRange.Fields
a           sField.Update
a       Next sField
a   Next sRange
End Sub

The macro steps through all of the defined story ranges (layers) in the document and then steps through each field in each of those ranges. The result is that all the fields end up getting updated.

Another simple, effective way to do it is shown here:

Sub UpdateAllFields2()
    ActiveDocument.PrintPreview
    ActiveDocument.ClosePrintPreview
End Sub

Note that this macro only displays Print Preview for the current document and then closes Print Preview. This results in the fields in the document being updated—regardless of location—because Word automatically updates fields whenever you print or use Print Preview.

Another approach is to change how you are using your fields. If the field is not updating, then you are probably using a REF field in the footer to reference the bookmarked version number on the title page. Instead, delete the bookmark and apply a unique style to the version number. (The style should be used only for the version number.) You can then use a STYLEREF field in the footer, and your version number is duplicated there. The benefit of this approach is that STYLEREF fields are, for some strange reason, updated dynamically whenever the source information (your version number) changes.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (12247) applies to Microsoft Word 2007 and 2010. You can find a version of this tip for the older menu interface of Word here: Field in Footer Won't Update.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Word and Character Count Information

Using fields you can easily insert both the word and character counts for a document into the document itself. As those ...

Discover More

Checking for Valid Hyperlinks

If you have a document containing a lot of hyperlinks, it would be cool if there was a way to check all those hyperlinks and ...

Discover More

Inserting Cells

When developing worksheets, you often need to make room in your existing information for new information. One of the chief ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Inserting a Dynamic Word Count in Your Document

Need to know how many words are in your document? You can use the NumWords field to add that statistic, dynamically, to ...

Discover More

Inserting the Total Number of Pages in Your Document

Word keeps track of many statistics for each of your documents. One statistic is the total number of pages in the printed ...

Discover More

Updating Fields in Locked Forms

Updating form fields in Word can be confusing, especially when the fields are locked in a form. This tips explains why the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven minus 1?

2016-10-04 18:07:58

Roel

If you are using Word to merge directories (catalogs) and the header/footer fields are not merging, try adding a 'section break - continuous' right after the last merge field in the body. This should work for any version of Word.


2016-09-28 17:28:16

Chris Edwards

The above isn't working for me but here is what I have working:

Sub UpdateAllFieldsIncludingHeaderFooter()
ActiveDocument.Fields.Update
For Each sSection In ActiveDocument.Sections
For Each sFooter In sSection.Footers
For Each sField In sFooter.Range.Fields
sField.Update
Next sField
Next sFooter
Next sSection
End Sub


2015-02-11 07:12:40

Mubashir Aziz

Guys just merge above macros and it will work. Actually Macro1 only updating fields in text boy and Macro2 updating footer and header. So just copy two line of
ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview
in
Sub UpdateAllFields1()
and please don't forget to remove a from this macro
cheers


2014-11-10 12:48:52

Julia

The UpdateAllFields macro didn't work for me. :( It ran with no errors, but did not update the fields in the header and footer.
I have a 3-page assigned project list, none of which include spending a few hours trying to fix this. I'll have to try to remember to update my dates manually. Thanks a lot Microsoft! If it's going to be like this we might as well go back to typewriters. :(


2014-10-21 15:56:23

Deborah

I am trying to get a field in the footer to "auto populate" immediately after entering. I am new with all this in Word and I am not understanding how to write the STYLEREF for it? I have entered a content control box for the name and "titled" it as Signature. I have it written as "STYLEREF Signature ?*MERGEFORMAT" and it gives me this:
"Error! Use the Home tab to apply Signature to the text that you want to appear here."
Your help is greatly appreciated.


2013-09-13 11:32:18

Michelle

Do you know why a custom if/then mergefield would work in the body of the document but not the footer?


2012-11-11 23:01:00

Sheldon

Automatic updating of fields when printing stopped working a few years ago, and no one seems to know why.


2012-11-06 13:49:19

Anne

Your tip about styleref works! Thank you, thank you, thank you! I've been struggling with this for a couple of days.


2012-11-05 14:05:14

philomena

Hmmmmm, I do NOT get updated fields by going to print preview. I have update fields before printing set in my Word Options as well.
I used to use this "feature" in the past, but it hasn't worked for me in a long time. Is this only going to work when the document is attached to the Normal.dotm global template? My documents are always attached to a company template.

Am I encountering an update limitation? I work in Word 2007.


2012-11-05 08:11:09

Calvin Wilson

I have a similar problem, and I am wondering if there's something I am doing wrong.

I have a specific style assigned to a customer number. The style is used only for the number.

I use a StyleRef field in the footer. The field updates as needed immediately after typing the number.

I use the same StyleRef field in the body of the document. The field does not update immediately. I have to press Ctrl+A then F9.

The keystrokes are not a problem for me, but the template in question is used by numerous other people. It's a training issue but a few days after the training, the keystrokes aren't remembered by others. Is there a way to make the field update immediately in the body of the document?

I am using Word 2010, Professional Plus.


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.