How to Fix Word Macro-Enabled Template Save As and Permission Errors
Question details
Users encounter file-permission errors or unexpected 'Save As' prompts when attempting to edit a macro-enabled template.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Editing, saving, or creating documents from macro-enabled templates (.dotm).
- Observed behavior
- Word forces a 'Save As' prompt, displays a file-permission/locking error when saving, or fails to trigger Document_Open VBA events.
Ensure all active Word documents are closed before editing your template, as open documents generated from the template will place a lock on the file.
Open the Template Correctly for Editing
To edit a .dotm file without triggering a 'Save As' prompt, you must open it directly rather than double-clicking.
Double-clicking a macro-enabled template (.dotm) by default creates a new document based on that template. If you try to save this new file, Word will naturally prompt you with 'Save As'.
Locate your .dotm file in the file explorer but do not double-click it, as this triggers the 'New Document' action.
Right-click the .dotm template file and select 'Open' from the context menu to edit the template itself.
Alternatively, launch Word, go to File > Open, browse to the location of your .dotm file, and open it.
Close Open Documents to Unlock the Template
Resolve file-permission errors by closing active documents that are currently locking the template.
Correctly Assign VBA Document Events
Ensure you are using the correct VBA event triggers depending on whether the code is meant for the template or the generated document.
Use WPS Writer to Create and Edit Macro-Enabled Templates
WPS Writer offers robust support for VBA macros, allowing you to seamlessly create, edit, and manage macro-enabled templates (.dotm and .docm) with high compatibility and an intuitive interface.
- 1. Open WPS Writer: Launch WPS Writer and navigate to the Developer tab to access macro tools.
- 2. Access the VBA Editor: Click on 'Macros' or 'Visual Basic' to write or edit your Document_New or Document_Open event codes.
- 3. Save as Template: Go to Menu > Save As and choose the 'Macro-Enabled Template (.dotm)' format to securely save your work.

Frequently Asked Questions
What is the difference between a .dotm and a .docm file?
A .dotm file is a macro-enabled template used as a blueprint to generate new files. A .docm file is a standard macro-enabled document. Creating a new file from a .dotm generates a new document that can utilize the template's embedded macros.
Why does my Document_Open macro not run when I double-click the template?
Double-clicking a template creates a new document rather than opening the template itself. To trigger an event when creating a new document from a template, you must place your code inside the Document_New VBA event instead of Document_Open.
How do I bypass the 'Save As' prompt when saving my template?
The 'Save As' prompt appears if you are editing a document generated from the template, rather than the template itself. Ensure you right-click the .dotm file and select 'Open' to edit the source template directly.
Why am I getting a file-permission error when modifying a .dotm file?
This occurs because the template is locked. Word places a lock on the template if you or another user on the network currently has an active document open that was created from it. Close all linked documents to release the lock.




