

The following is an example of an AutoOpen macro you can use. 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. If you want to update the fields when the document is opened, you'll need to use a macro to accomplish the task. That setting should make sure that all your links are always up to date.

Using Events requires that you instantiate the app object class. If bSaved = True And ActiveDocument.Saved = False Then ActiveDocument.SaveĮnd SubTo intercept printing & saving requires creating events to intercept. ' Loop through all range objects and accept tracked changes on fields 'This sub accepts any tracked changes affecting fields ' Loop through Tables Of Figures and update ' Loop through Tables Of Authorities and update ' Loop through Tables Of Contents and update ' in TOCs, TOAs and TOFs - field updating doesn't update TOC, TOA or TOF contents. ' The following routines are necessary because the foregoing updates only page numbers ' Note that this may trigger interactive fields (eg ASK and FILLIN). A macro that might be used in the Normal template's 'This Document' module is:ĭim TOC As TableOfContents ' Table of Contents Objectĭim TOA As TableOfAuthorities ' Table of Authorities Objectĭim TOF As TableOfFigures ' Table of Figures Object What is possible, though not necessarily advisable, is to add macros to, say, Word's Normal template to trigger the field updating any time a document is opened or saved.

Of course, you wouldn't want to use one of these in most documents as the forms protection that these require severely restricts editing. Fields that do still update automatically include most fields ordinarily used in page headers/footers (and this includes certain fields that don't update automatically when in the body of the document).Īnd yes, there is an option that updates all fields automatically if any of them change - its any formfield that has the 'calculate on exit' option checked. Some years ago, MS did change the update of some fields that previously updated automatically in the body of the document, but not all.

There are numerous fields a user wouldn't want to update automatically, including ASK & FILLIN fields. Whilst links use fields, not all fields are links. Word has never had such an option, but has had an option to update links automatically.
