VBA & Macro Problems

How to Remove a Macro from Word's Normal.dotm Template

Chanuka GeekiyanageChanuka Geekiyanage Nov 3, 2026 868 views

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.

How to Remove a Macro from Word's Normal.dotm Template
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.
Before you start

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.

Solution 1Recommended

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.

1
Close Microsoft Word

Ensure all Microsoft Word document windows and background processes are completely closed.

2
Navigate to the Templates Folder

Open File Explorer and navigate to C:\Users\[username]\AppData\Roaming\Microsoft\Templates. Replace [username] with your actual Windows username.

3
Locate and Rename Normal.dotm

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.

4
Restart Microsoft Word

Open Microsoft Word. The application will automatically create a new, clean Normal.dotm file without the problematic macros.

Rename the Normal.dotm File to Reset the Template
Restoring Custom Settings: Because resetting the template removes your custom AutoCorrect entries, AutoText, and styles, you can later use the Organizer tool in Word to copy essential styles from your renamed 'Normal.dotm.old' file back into the newly generated template.
Free Microsoft Office alternative

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. 1. Download and Install: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Open Your Existing Documents: Launch WPS Writer and seamlessly open all your existing .docx and .doc files without losing any formatting.
  3. 3. Enjoy Stable Editing: Edit, format, and save your documents using familiar tools, free from template corruption errors.
Highly compatible with Microsoft Word formats (.doc, .docx, .dotm).Free to use, lightweight, and very fast to install and launch.Familiar ribbon user interface makes switching completely seamless.Stable environment with fewer background template-locking issues.
microsoft office alternative - wps office

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.