Fix Word VBA Out of Memory Error When Creating a Macro
Question details
The user encounters an 'Out of Memory' error message when attempting to create or edit a VBA macro in Microsoft Word.

- Product
- Microsoft Word (Microsoft 365)
- Device & OS
- not provided
- Scenario
- Creating a new macro within a Word document or the global Normal.dotm template.
- Observed behavior
- Microsoft Word displays an 'Out of Memory' error and fails to create the macro. Additionally, running an Online Repair for Office may result in the software unexpectedly uninstalling or disappearing from the desktop.
Save your current documents and try launching Microsoft Word in Safe Mode (hold the CTRL key while clicking the Word icon) to determine if the error still occurs. If the macro works in Safe Mode, a third-party add-in is likely causing the issue.
Disable Interfering Word Add-ins
If you can successfully create macros in Safe Mode, a third-party add-in is likely conflicting with the VBA editor. Disabling add-ins will resolve the memory error.
Many third-party extensions, particularly those that integrate deeply with Word's drafting environment, can cause memory conflicts with the Visual Basic for Applications (VBA) compiler.
Launch Microsoft Word normally. Click on 'File' in the top-left corner, select 'Options' at the bottom, and then click on 'Add-ins' in the left sidebar.
At the bottom of the window, locate the 'Manage' dropdown menu. Select 'COM Add-ins' and click the 'Go...' button.
Uncheck all active add-ins in the list and click 'OK'. Restart Word and attempt to create your VBA macro again. If it works, re-enable your add-ins one by one to identify the specific culprit.

Reset the Normal.dotm Global Template
A corrupted default global template (Normal.dotm) can disrupt macro creation. Renaming the file forces Word to generate a fresh, error-free template.
Perform an Online Repair or Reinstall Microsoft 365
If the VBA compiler files are damaged, an Office Online Repair or a full reinstallation may be required to restore functionality.
Try WPS Office for a Stable Document Creation Experience
If you are tired of dealing with missing applications, complex repair processes, or VBA crashes in Microsoft Word, consider switching to WPS Office. It provides a highly stable, resource-efficient environment for handling all your document tasks.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button to get the lightweight installer.
- 2. Install WPS Office: Run the downloaded file and follow the straightforward setup instructions to install the suite in minutes.
- 3. Open Your Documents: Launch WPS Writer and open your existing .docx files directly. Your formatting and text will remain perfectly intact.

Frequently Asked Questions
Why am I getting an 'Out of Memory' error when I have plenty of RAM?
In Microsoft Word, an 'Out of Memory' error during VBA macro creation rarely indicates a physical lack of system RAM. Instead, it is usually caused by an internal memory leak triggered by a faulty COM add-in, a corrupted Normal.dotm template, or limitations within the 32-bit architecture of the Office application.
What is the Normal.dotm file in Word?
Normal.dotm is the default global template used by Microsoft Word to create new, blank documents. It stores your custom macros, styles, AutoText entries, and default formatting settings. If this file becomes corrupted, it can cause various errors, including VBA crashes.
Why did Microsoft Office disappear after running an Online Repair?
This is a known glitch with the Microsoft 365 installation engine. The Online Repair process actually uninstalls the current suite and attempts to download and reinstall fresh copies of the applications in the background. If the background download is interrupted by a network issue or an internal error, the applications are left uninstalled. You must then log into the Microsoft portal to download the installer manually.




