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: Automatically Updating Fields and Links.

Automatically Updating Fields and Links

by Allen Wyatt
(last updated January 23, 2013)

14

Stephanie wondered if there is a way in Word to force the updating of all fields and links in a document when either opening or saving (closing) the file. She knows that she can force updates prior to printing, but she was looking, specifically, for the open or close method of updating.

You can automatically update both fields and links when you print a document, but Word treats the two items differently when you are opening a file. Word provides a way to always update your links when opening a document. You can do this by following these steps:

  1. Display the Word Options dialog box. (In Word 2007 click the Office button and then click Word Options. In Word 2010 display the File tab of the ribbon and then click Options.)
  2. Click on Advanced at the left side of the dialog box. (See Figure 1.)
  3. Figure 1. The General area of the Word Options dialog box.

  4. In the General area (scroll down a bit to see it), make sure the Update Automatic Links at Open check box is selected.
  5. Click on OK.

That setting should make sure that all your links are always up to date. If you want to update the fields when the document is opened, you'll need to use a macro to accomplish the task. Specifically, you'll need to use either an AutoOpen or AutoClose macro, depending on whether you want to update the fields when the document opens or closes. The following is an example of an AutoOpen macro you can use.

Sub AutoOpen()
    With Options
        .UpdateFieldsAtPrint = True
        .UpdateLinksAtPrint = True
    End With
    ActiveDocument.Fields.Update
End Sub

Note that the macro makes sure that the options are set to force updating the fields and links when printing occurs, then it updates all the members of the Fields collection in the document. If you, instead, wanted to update the fields at closing, you could use this macro:

Sub AutoClose()
    ActiveDocument.Fields.Update
End Sub

This macro is much shorter because there is no need to set the update-on-print options when you are exiting the document.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (978) applies to Microsoft Word 2007 and 2010. You can find a version of this tip for the older menu interface of Word here: Automatically Updating Fields and Links.

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

Make AutoCorrect Pay Attention to Character Case

If you rely on AutoText (as most Word users do), you may have noticed that it doesn't always give the desired results with ...

Discover More

Understanding the Control Panel

The Control Panel is the heart of Windows. It allows you to change how Windows operates and how it communicates with the ...

Discover More

Adjusting Trendlines in a Chart

In the past, Excel allowed you to actually adjust lines and data points in a chart and have your adjustments reflected in the ...

Discover More

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (ribbon)

Using Continued Lines

You can create a special header and footer page numbering scheme by using nested fields. This tip shows an example of how you ...

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

Calculating Dates with Fields

Can you calculate dates using fields? Yes, but you probably don't want to except as a learning experience. An easier way is ...

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 7 + 5?

2017-02-07 21:39:41

C Perkins

At least in Word 2013, one can also go to File | Options | Display, then down to the Printing Options section. There are two checkboxes there that correspond to the UpdateFieldsAtPrint and UpdateLinksAtPrint properties shown in the macro. This helps avoid having to use macros, especially in Word 2013 which requires a special "macro-enabled" format for the word doc. It still does not update automatically without printing, but at least the output will be up-to-date.


2016-11-24 05:12:10

Gareth

In case anyone is wondering where it is saved - it is a Group Policy setting : "Update fields before printing"


2016-11-23 12:04:40

Pierre

Hi, I'm using the macro with Word 2010 and for some reason, the fields PAGE and NUMPAGES will not be updated in footers after page 4.

In a 10 pages document, I would have 1 of 4, 2 of 4, 3 of 4, and 4 of 4 starting on page 4 until the end?

Any idea why NUMPAGES stocks is stock at 4 for all pages? Why does PAGE stop incrementing after page 4?

It does the same for any documents with different number of pages.

Thanks


2016-10-13 12:09:42

Gareth

Does anyone know where this setting is saved?
Some of our users have it ticked and some don't.

Is it saved in the normal template?


2016-05-02 23:44:58

Alan

None of these methods work for all fields in the header/footer ?


2015-12-28 00:16:43

Kevin

My facts - F9 doesn't update my fields. Ryan's macro does but it puts "Go to..............Page Break........" in front of the first field where no Page Break existed.
With "View Field Codes" turned On, the fields come back to the page where the "Go To" is.
Print Preview does update the fields.


What do I need to check to get F9 to update links?
What in Ryan's code puts the "Go to..............Page Break........" , so as to avoid that (or other code)?


2015-06-25 10:56:35

Don Martin

Press the F9 key to update fields.


2015-04-29 07:10:57

Elad

I was looknig for a way to update indexes (fields) in my word document after adding a new index (field), which caused all the following indexes to have incorrect (old) value.
Ryan's macro above helped me and did the work.
Thanks Ryan!


2015-02-23 06:58:29

Maryland, USA

Linda, yes there is a way: Copy the number from the table and paste it into the text as a hyperlink, uding Paste Special... Choose Rich Text for its formatting to match the surrounding text.


2015-02-22 15:46:49

Linda

Is there a way to link a number from a Word table to the same number referenced in text (same document) so that it will update in text if changed in the table?


2014-10-15 23:20:07

Joe

Very helpful post. I can confirm that links between Excel 2013 and Word 2013 do NOT update correctly (with or without the setting box checked to do so). Using this script forces the update very smoothly. Thank you!


2014-07-04 01:42:24

Ryan

Sub UpdateAllFields()

Dim aStory As Range
Dim aField As Field

For Each aStory In ActiveDocument.StoryRanges
For Each aField In aStory.Fields
aField.Update
Next aField
Next aStory

End Sub


2014-05-21 08:20:15

Sheldon

Many years ago, I set Word up to update fields and links on printing. A few years ago, this great feature stopped working. Our IT guys said it was a known bug in a Microsoft service pack, but I'm not convinced, as other people say their automatic updates still work. Is there some other setting than the one shown above that affects automatic updating?


2013-09-25 11:56:16

RB

The AutoOpen () macro works wonders. My settings meant that Word should have been updating the linked files, but there was no consistency and I couldn't puzzle out what was happening... running AutoOpen () updates them perfectly :-)


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.