How to Automatically Update the FILENAME Field in Word for Mac
Question details
The user wants Microsoft Word for Mac to automatically update the FILENAME field (including the \p switch for the file path) whenever the document is saved, noting that most available instructions cater to Windows.
- Product
- Microsoft Word
- Device & OS
- Mac
- Scenario
- Saving a document and needing the embedded file name and path fields to reflect the current file status automatically.
- Observed behavior
- The FILENAME field does not update automatically upon saving the document, requiring manual updates or complicated workarounds.
Before modifying your Normal.dotm template with VBA, test the macro on a duplicate document to verify its behavior across different Word for Mac versions.
Use a VBA Macro to Update Fields on Save
Add a FileSave macro to your Normal template to force all fields in the active document to update automatically whenever you save.
Because Word for Mac does not natively auto-update the FILENAME field upon saving, inserting a custom macro intercepts the save action and updates the fields first. Note that macro behavior can vary slightly depending on your exact version of Office for Mac.
Launch your document in Word for Mac and press 'Option + F11' to open the Visual Basic for Applications (VBA) editor.
In the left-hand project pane, locate 'Normal.dotm' (your default template). Right-click it, select 'Insert', and then click 'Module'.
In the new module window, paste the following code: Sub FileSave() Dim oField As Field For Each oField In ActiveDocument.Fields oField.Update Next oField End Sub
Save your changes in the VBA editor and close it. Going forward, pressing Save in any document using the Normal template will trigger this code and update your fields.
Activate Print Preview (For Header/Footer Fields)
Use the Print Preview screen as a quick, macro-free workaround to force field updates, provided your field is located in the header or footer.
Experience Hassle-Free Document Editing with WPS Office for Mac
If you are frustrated by complex macros and missing auto-update features in Microsoft Word for Mac, try WPS Office. It provides a lightweight, highly compatible, and user-friendly alternative for managing your documents effortlessly.
- 1. Download and Install: Visit the official WPS website to download the free WPS Office installer for Mac and follow the on-screen instructions to install.
- 2. Open Your Document: Launch WPS Writer and easily open or drag-and-drop your existing .docx files into the workspace.
- 3. Edit Seamlessly: Enjoy editing your documents with full formatting retention and a rich set of built-in tools that require no complex macro setups.

Frequently Asked Questions
Why does the FILENAME field not update automatically in Word for Mac?
By default, Word only updates specific fields when a document is opened or sent to the printer to conserve system resources. Updating fields strictly upon saving requires manual intervention or a custom VBA macro.
How do I manually update the FILENAME field on a Mac?
You can manually update any field by selecting it, holding the 'Control' key while clicking (or right-clicking), and selecting 'Update Field' from the context menu.
Does the Print Preview trick work for fields in the main document body?
No, activating Print Preview typically only forces fields located in the header or footer to update. If your FILENAME field is in the main body text, you must use a macro or update it manually.




