How to Remove a Macro from Word's Normal.dotm Template
Question details
The user needs to remove a macro from Word's global template, but the file may be locked or damaged, preventing standard deletion and causing errors.

- Product
- Microsoft Word
- Device & OS
- Windows
- Scenario
- Attempting to delete a macro from the default Normal.dotm template to resolve functional errors.
- Observed behavior
- The macro cannot be deleted through standard menus, and Word produces a 'Sub or Function not defined' error due to template corruption or locks.
Make sure Microsoft Word is completely closed before attempting to modify template files in your system. It is highly recommended to back up your original template first, as resetting it will remove custom styles, AutoText, and keyboard shortcuts.
Rename the Normal.dotm File to Reset the Template
This solution bypasses locked or damaged files by forcing Word to automatically generate a fresh, macro-free Normal.dotm template the next time it starts.
For Word 2007 and later versions, the global template is named Normal.dotm. By renaming this file while Word is closed, the program can no longer find it upon launch. Word will then safely recreate a brand-new default template, effectively erasing any broken or stubborn macros.
Ensure all Microsoft Word document windows and background processes are completely closed.
Open File Explorer and navigate to C:\Users\[username]\AppData\Roaming\Microsoft\Templates. Replace [username] with your actual Windows username.
Find the file named Normal.dotm. Right-click the file, select 'Rename', and change its name to 'Normal.dotm.old' or 'Normal_Backup.dotm'. Press Enter to save.
Open Microsoft Word. The application will automatically create a new, clean Normal.dotm file without the problematic macros.

Switch to WPS Office for a Stable and Seamless Experience
If Microsoft Word's templates are constantly crashing, locking up, or giving macro-related errors, try WPS Office. It provides a stable, lightweight word processing environment that fully supports Microsoft Office document formats without the bloated legacy issues.
- 1. Download and Install: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Open Your Existing Documents: Launch WPS Writer and seamlessly open all your existing .docx and .doc files without losing any formatting.
- 3. Enjoy Stable Editing: Edit, format, and save your documents using familiar tools, free from template corruption errors.

Frequently Asked Questions
Why can't I find the AppData folder to locate Normal.dotm?
The AppData folder is hidden by default in Windows. To view it, open File Explorer, click on the 'View' tab at the top, and check the box that says 'Hidden items'. The folder should now be visible in your user directory.
What does the 'Sub or Function not defined' error mean?
This is a VBA (Visual Basic for Applications) error indicating that a macro is trying to execute a specific subroutine or function that cannot be found. This often happens if the macro code is incomplete, has typos, or if the template containing the referenced code is damaged.
Can I just delete the macro from the Word Developer tab instead of renaming the template?
Yes, if the template isn't locked or damaged, you can go to the 'Developer' tab, click 'Macros', select the macro from the list (ensuring 'Normal.dotm' is selected in the 'Macros in' dropdown), and click 'Delete'. However, if the file is corrupted, renaming the file via File Explorer is the guaranteed workaround.




