Fix Word Macro Buttons in a .dotm Template
Question details
The user needs custom Word macro buttons to work after saving a macro-enabled document as a template.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- A .docm document with custom macro buttons is saved as a .dotm template while its macros and toolbar customizations are stored in different templates.
- Observed behavior
- Custom buttons may fail with Run-time error 424 after the conversion.
Open the .dotm template directly in desktop Word and identify where the macros and buttons are currently stored. Enable macros only if the file and its code come from a trusted source.
Store the macros and Quick Access Toolbar buttons in the same template
Use this approach when buttons saved in the .dotm template point to macros in Normal.dotm or another template.
Recreating the button assignment after moving the macro can restore the link to the correct template. Error 424 can also have other causes, so this is a targeted fix rather than a guarantee.
In Word, select File > Open and open the .dotm file itself, rather than creating a new document from it.
Open the VBA editor with Alt+F11 and use the Project Explorer to find the macro modules in Normal or the other source template.
In the VBA editor, export the required modules from the source project, then select the target .dotm project and import them through File > Import File. Include any required forms, references, or other code dependencies.
In Word, open File > Options > Quick Access Toolbar. Select the .dotm template as the customization scope if available, remove the old macro button, and add the macro from the target template using the Macros command list.
Save and reopen the .dotm template, then select the rebuilt button. Also test a new document created from the template.

Rebuild the macro-enabled template from scratch
Try a fresh template if the converted .dotm file still has broken button assignments.
Work with Word Documents in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Word documents. Its format support helps you move everyday files between Office suites; it does not repair Word's template or macro-button links.

Frequently Asked Questions
Why did my macro button stop working after I saved the document as a template?
The button may still refer to a macro in Normal.dotm or another template. Copy the macro to the .dotm file and recreate the button under File > Options > Quick Access Toolbar.
Does error 424 always mean the button points to the wrong template?
No. Error 424 means an object is required and can also occur inside the macro code. If reassigning the button does not help, use the VBA editor's Debug option to inspect the failing line and its object references.
How can I tell where a Word macro is stored?
Open the VBA editor with Alt+F11 and check Project Explorer for the macro's module under Normal or an open document or template project.
Can I use a .docm file as a template without changing its extension?
A .docm file is a macro-enabled document, not a Word template. To create a template, use File > Save As and choose Word Macro-Enabled Template (.dotm), then verify the macros and button assignments.




