bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > General > Automatically Updating Fields and Links

Automatically Updating Fields and Links

Summary: You can update fields and links automatically when you print your document, but what if you want them updated when you open or close the document? That is not as easy of a proposition, but there are ways to fulfill the request, as shown in this tip. (This tip works with Microsoft Word 97, Word 2000, Word 2002, Word 2003, and Word 2007.)

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. (Click here to see a related figure.)
  3. Click the Update Automatic Links at Open check box.
  4. Click on OK.

If you are using Word 2007, the process is a bit different:

  1. Click the Office button and then click Word Options. Word displays the Word Options dialog box.
  2. Click on Advanced at the left side of the dialog box. (Click here to see a related figure.)
  3. In the General area (scroll down a bit to see it), make sure the Update Automatic Links at Open check box is selected.
  4. 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.

Tip #422 applies to Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007


Ultimate Library! The most amazing collection ever offered in the history of WordTips places every tip—present and historical—at your fingertips. Check out the WordTips Ten-Year Library.

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home
Vital News Home

WordTips FAQ
WordTips Premium

Learn Access Now

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
WordTips Site

 

Great Info!

Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)