Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Automatically Updating Fields and Links.

Automatically Updating Fields and Links

Written by Allen Wyatt (last updated November 3, 2021)
This tip applies to Word 97, 2000, 2002, and 2003


5

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. Choose Options from the Tools tab. Word displays the Options dialog box.
  2. Make sure the General tab is selected. (See Figure 1.)
  3. Figure 1. The General tab of the Options dialog box.

  4. Click the Update Automatic Links at Open check box.
  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.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (422) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) 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

Merging and Printing

When you merge information into a document, Word provides two different ways you can create your output. Here's an ...

Discover More

Functioning Check Boxes in a Protected Worksheet

Want to protect a worksheet but maintain the ability to make changes to the check boxes you add to the worksheet? Here is ...

Discover More

Clearing the Contents of a Table

Want to get rid of information within a table, but not the table itself? Here's a guide to understanding the effects that ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (menu)

Hiding a Stubborn Toolbar

Got a toolbar giving you problems? Here's some ideas on how to make sure it stays hidden except when you want it displayed.

Discover More

Changing the Maximum Undo Levels

Want to change the number of "undo" steps available when editing? You can't, because Word doesn't' really have a maximum. ...

Discover More

An Unruly Ruler

Does the ruler in Word seem to have a mind of its own? If you have problems understanding why the ruler behaves as it ...

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}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. 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 5 - 5?

2018-02-02 15:20:49

Alessio

I don't know what happened. I'm a videographer that produces a lot of motion graphics. I have a word document that serves as a script bible, that contains all of the content. I have a folder with a dozen word files that have this VBA code in them, and I reference these files to various scenes in my bible using bookmarks. I then put them through a TTS reader and create an audio file.

Question:
I used to be able to update the bible and have it update my audio file with out having to quit out of the Bible word document. Since the last windows update the VBA moded word doc returns a "Error ! cannot open file" when I try to updates it with the bible file open.

Do you know what may have happened?

it adds an extra 3 steps to my workflow which I find annoying because the bible gets updated often.

Windows 10 Home
Version 10.0.16299
Build 16299
Microsoft Office 365
Version 1712

Code used:
Sub UpdateAllFields()
ActiveDocument.Fields.Update
Document_Open (ThisDocument.Fields.Update)
End Sub

Private Sub Document_New()

End Sub

Private Sub Document_Open()
ThisDocument.Fields.Update
End Sub

Private Sub Document_Sync(ByVal SyncEventType As Office.MsoSyncEventType)
ActiveDocument.Fields.Update
End Sub


Thank very much for this site, I have been learning alot.


2017-06-13 07:05:27

Reezwana

I have linked images in a word document (word 2010). 'Update automatic links at open' is unchecked. However, each time I open the word document, it automatically updates all linked images in the document. How do change the settings so that I can manually update linked images in the word document by hitting F9?

I tried the 'Edit Links to Files' option, but the options of selecting 'Automatic update' or 'Manual update' are greyed out. Also, in the list of all my linked images, under the column 'Update', it has 'Man' for each linked image.

So if all the images are set to update manually, as per the link manager above, why does it still update each time I open the word document?


2017-06-13 06:52:27

Reezwana

I have linked images in a word document (word 2010). 'Update automatic links at open' is unchecked. However, each time I open the word document, it automatically updates all linked images in the document. How do change the settings so that I can manually update linked images in the word document by hitting F9?

I tried the 'Edit Links to Files' option, but the options of selecting 'Automatic update' or 'Manual update' are greyed out. Also, in the list of all my linked images, under the column 'Update', it has 'Man' for each linked image.

So if all the images are set to update manually, as per the link manager above, why does it still update each time I open the word document?


2017-01-17 11:48:45

Lohith

how to updaet all the page number in index page using VB script please help me


2016-11-02 10:47:40

James Aston

Awesome tip! I'd put together an Excel tool and linked Word templates a while back to allow exam front covers to be produced that were of the same format and standard regardless of the exam in question. We had a recent software update which threw all the settings out, and the people now doing the exams (I've moved positions since then) couldn't get it to work, so they asked me. I changed the settings, rechecked it and gave it back to them but it didn't work - seems that when I changed the settings in the options menu it only saved them for me, not for the documents (they're on a MOSS site) - I updated the Word templates with your macro (a nice easy cut and paste) and hey presto!! Brilliant! Thank you!


This Site

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

Videos
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.