logo
search
Office for Mac Issues

How to Automatically Update the FILENAME Field in Word for Mac

Maira MehtabMaira Mehtab Sep 21, 2026 869 views

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 you start

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.

Solution 1Recommended

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.

1
Open the VBA Editor

Launch your document in Word for Mac and press 'Option + F11' to open the Visual Basic for Applications (VBA) editor.

2
Access the Normal Template

In the left-hand project pane, locate 'Normal.dotm' (your default template). Right-click it, select 'Insert', and then click 'Module'.

3
Paste the Macro Code

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

4
Save and Close

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.

Free Microsoft Office alternative

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. 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. 2. Open Your Document: Launch WPS Writer and easily open or drag-and-drop your existing .docx files into the workspace.
  3. 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.
Fully compatible with Microsoft Word (.docx), Excel, and PowerPoint formats.Built-in PDF editor for seamless document conversion and editing.Lightweight installation with a clean, intuitive interface familiar to Mac users.Free to download and use for essential daily tasks without complex configurations.
microsoft office alternative - wps office

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.