How to Fix Word VBA AutoExec Macro Not Working After Migration
Question details
The user's Word VBA AutoExec macro and DocumentOpen events stopped running automatically after migrating to a new computer, changing Office versions, or migrating to a third-party provider.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Running VBA macros automatically upon opening Word documents after a system or Office migration.
- Observed behavior
- The AutoExec macro and application DocumentOpen events fail to trigger or execute properly when launching the application or opening documents.
Ensure that macros are enabled in your Word Trust Center settings, as new Office installations or security updates often disable them by default for protection.
Verify Macro Security Settings and Template Location
Ensure Word is allowed to run macros and that the AutoExec macro is properly placed in a trusted location or global template.
When moving to a new computer or updating Office, security settings are often reset. AutoExec macros must be stored in specific locations and explicitly allowed by the application's security policies to run without manual intervention.
Open Microsoft Word, navigate to File > Options > Trust Center, and click on 'Trust Center Settings'. Under 'Macro Settings', ensure that macros are enabled or that your file is stored in a Trusted Location.
Confirm your macro is saved in the Normal.dotm template or a global template stored within the designated Word Startup folder.
Ensure your application-level DocumentOpen event class is properly initialized in a standard module, as initialization hooks can sometimes break during version migrations.

Consult Specialised VBA Programming Communities
For complex DocumentOpen event failures after migration that cannot be fixed by basic settings, seek help from specialized programming forums.
Switch to WPS Office for a Seamless Document Experience
If you are struggling with persistent Microsoft Word VBA errors after a system update, WPS Office provides a lightweight, highly compatible alternative. Enjoy a familiar interface, seamless migration, and robust document handling without the heavy footprint.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the Application: Run the installer and follow the simple on-screen prompts to set up WPS Office on your new computer.
- 3. Open Your Word Documents: Launch WPS Writer and open your existing Word files directly with complete formatting and layout preservation.

Frequently Asked Questions
Why is my AutoExec macro not running automatically when Word opens?
This usually happens because macro security settings are blocking execution, the macro is not placed in a globally loaded template like Normal.dotm, or the template is not located in the Word Startup folder.
Where should I store an AutoExec macro in Word?
An AutoExec macro must be stored in a standard module within a global template or the Normal.dotm template to execute automatically when the Word application starts.
Are macros disabled by default after migrating to a new PC?
Yes, new Microsoft Office installations typically revert to default security settings, which disable macros originating from external sources or unverified locations to protect your system from malicious code.




