How to Edit and Save a Macro-Enabled Word Template (.dotm)
Question details
The user needs to open an existing macro-enabled Word template (.dotm) to edit its VBA macros and save the changes.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Modifying the VBA code or layout of an existing .dotm template file.
- Observed behavior
- Double-clicking or opening the .dotm file from the template area creates a new blank document based on the template, preventing the user from saving VBA changes to the actual template file.
Ensure you know the exact folder location of your .dotm file (often in 'Custom Office Templates') and close any currently open documents based on that template before attempting to edit it.
Open the Template Directly from File Explorer
Bypass the default 'New' action in Windows by explicitly choosing to 'Open' the template file from its folder location.
By default, Windows is configured to create a new document when you double-click a Word template. You must use the context menu to force Word to open the source file instead.
Open File Explorer and navigate to the folder containing your .dotm template file.
Right-click the .dotm file to open the context menu. Do not double-click the file.
Click 'Open' from the list of options (ensure you do not click 'New').
Check the title bar in Word. It must display your exact filename ending in '.dotm'. You can now make your VBA macro changes and press Ctrl+S to save the template.

Use the Open Command Within Word
Use Word's internal Open dialog to guarantee you are opening the original template file for editing.
Move Templates from the Startup Folder Before Editing
Templates stored in the Word Startup folder load automatically as add-ins, which locks them from being edited directly.
Edit Document Templates Seamlessly with WPS Writer
WPS Writer offers full compatibility with Microsoft Word template formats. You can effortlessly open, edit, and save template files directly from a highly intuitive interface without worrying about conflicting context menus.
- 1. Launch WPS Writer: Open WPS Office and click on 'Docs' to launch the word processing module.
- 2. Access the Open menu: Click 'Menu' in the top-left corner and select 'Open', or press the Ctrl+O keyboard shortcut.
- 3. Select your template: Navigate to the folder containing your .dotm template, select it, and click 'Open'.
- 4. Edit and save directly: WPS Writer opens the actual template file. Make your layout or content changes and click the 'Save' icon to update the template instantly.

Frequently Asked Questions
Why does double-clicking a .dotm file create a new document?
By default, Windows associates template files with the 'New' command to protect the original file from accidental changes. This generates a fresh, blank document based on the template's formatting.
How do I know if I am editing the template or a new document?
Look at the title bar at the top of the Word window. If it displays the exact template name with the .dotm extension (e.g., 'InvoiceTemplate.dotm'), you are editing the template. If it shows 'Document1' or a similar generic name, you are in a new file.
Where is the default custom templates folder located?
On most modern Windows installations, personal templates are automatically saved in 'C:\Users\[YourUsername]\Documents\Custom Office Templates'.
Can I save my macro changes if I accidentally opened a new document?
No, VBA changes made in a newly generated document will only apply to that specific document (which must then be saved as a .docm file). To update the macros for all future documents, you must close it, open the original .dotm file, and make the changes there.




