Automatically Updating Fields and Links

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.

Figure 1. The General area of the Word Options dialog box.

  1. In the General area (scroll down a bit to see it), make sure the Update Automatic Links at Open check box is selected.
  2. 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.