Automatically Update Fields on Opening a Document

0 Flares 0 Flares ×

To take advantage of some of the more advanced features of Word, you require the use of fields. Table of contents, cross references, captions, formulas etc. all use fields to provide automation to the document.

When a document changes these fields need to be updated. This can be done by pressing the F9 key, or by right clicking on the required field and choosing Update Field.

If the document changes regularly, or is large and time consuming to keep track of the many fields used, it could be a good idea to set Word to automatically update the fields on opening the document.

The following post explains how to create a macro that is run on opening a word document.  The result is that all document fields are automatically updated upon opening the document.

  1. Open the document which you wish to add the macro to automatically update fields
  2. Press Alt+F11 to open the Visual Basic Editor
  3. On the left you should notice an area called Normal and another with the Project (name of the document)
  4. Under the heading saying Project (name of the document) and Microsoft Word Objects double click This Document
  5. At the top of the code module window that appears are 2 lists.  Click on the first one and select Document and then select Open from the one on the right
  6. Enter the text as shown below between the opening and closing Document_Open procedure statements



Update fields automatically when opening a document

  1. Save and close the document

The document will update fields automatically now whenever it is opened. This will save the user a job every time the document is changed, and also improve the accuracy of the file.

Word 2010 Tutorials & Training

Leave a Reply

Your email address will not be published. Required fields are marked *