Choose Options from the Tools tab

Auto updating fields in word

She knows that she can force updates prior to printing, but she was looking, specifically, for the open or close method of updating. Microsoft Word is the most popular word processing software in the world. If you want to update the fields when the document is opened, you'll need to use a macro to accomplish the task. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose.

Workaround To work around this behavior, use one of the following methods. Sub AutoOpen With Options. 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. So when the user closes the document they will be asked if they want to save their changes.

Luckily, Microsoft give a workaround in the knowledge base article in the form of a macro that will automatically run when the document is opened, updating all the fields. In the code sheet of the Microsoft Visual Basic editor, you should now see the beginnings of your AutoOpen macro. You could also use a macro to perform these tasks.

The main document is one story, headers and footers another, graphics another, and so on. They now show who last read the document, and when they closed it. Change the Macros in box to your document file name. The next time the document is opened the macro runs and updates the fields. Word provides a way to always update your links when opening a document.

Workaround To work around this

This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. In the Macro name box, type AutoOpen.

Sub AutoOpen With Options

When this property is true, it means that the document has been saved since the last edit. Get tips like this every week in WordTips, a free productivity newsletter. However, the save function would have to run after the document was saved in order to pick up the values of who saved, when and where, and then you would need to save again to update those fields. So I created a few templates that included these in the footer.