logo
search
Template Issues

How to Edit and Save a Macro-Enabled Word Template (.dotm)

Olivia MillerOlivia Miller Sep 30, 2026 869 views

Question details

The user needs to open an existing macro-enabled Word template (.dotm) to edit its VBA macros and save the changes.

How to Edit and Save a Macro-Enabled Word Template (.dotm)
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.
Before you start

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.

Solution 1Recommended

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.

1
Locate the file

Open File Explorer and navigate to the folder containing your .dotm template file.

2
Use the context menu

Right-click the .dotm file to open the context menu. Do not double-click the file.

3
Select Open

Click 'Open' from the list of options (ensure you do not click 'New').

4
Verify and save

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.

Open the Template Directly from File Explorer
Verification Tip: If the title bar says 'Document1' or similar, you have created a new file. Close it and try the right-click method again.
Easy Document Management

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. 1. Launch WPS Writer: Open WPS Office and click on 'Docs' to launch the word processing module.
  2. 2. Access the Open menu: Click 'Menu' in the top-left corner and select 'Open', or press the Ctrl+O keyboard shortcut.
  3. 3. Select your template: Navigate to the folder containing your .dotm template, select it, and click 'Open'.
  4. 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.
Fully compatible with Microsoft Word .dotm, .dotx, and .dot formatsIntuitive tabbed interface to manage multiple documents and templates easilyLightweight application that opens large macro-enabled files instantlyFree to use with comprehensive document formatting and layout management
microsoft office alternative - wps office

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.