How to Stop Word Macros from Running Automatically on Startup
Question details
The user needs to prevent embedded macros from executing automatically when a Word document is opened.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Opening a document containing AutoOpen macros that execute and alter the document structure unexpectedly upon startup.
- Observed behavior
- The document opens, automatically triggers macro scripts, and drastically changes its content by expanding from 32 pages to 94 pages.
Ensure you know the source of the document before modifying macro settings. Unexpectedly expanding documents can sometimes indicate malicious macros or unstable VBA scripts.
Bypass Automatic Macros Using the Shift Key
This is a quick, one-time method to open a document without triggering its AutoOpen or AutoExec macros, giving you a chance to inspect the code safely.
Microsoft Word includes a built-in shortcut to suppress macros during the document loading process. This method works perfectly for individual files without changing your global security settings.
Open the Microsoft Word application from your desktop or Start menu, but do not open the specific macro-enabled document just yet.
Click on 'File' in the top ribbon and select 'Open'. Browse to the folder containing the document you want to open.
Select the file. Before clicking the 'Open' button, press and hold down the left 'Shift' key on your keyboard.
While continuing to hold the 'Shift' key, click 'Open'. Do not release the 'Shift' key until the document has completely finished loading on your screen.

Disable All Macros via Trust Center
Change your default application settings to block all macros globally, ensuring that no script runs without your explicit permission.
Switch to WPS Office for a Safer Document Experience
If you frequently encounter legacy macro issues or complex security settings in Microsoft Word, consider trying WPS Office. It provides a highly compatible, secure, and user-friendly word processing environment that gives you full control over document scripts.
- 1. Download the Installer: Visit the official WPS website and download the free WPS Office installation package.
- 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to set up the software.
- 3. Open Your Files Safely: Launch WPS Writer, click 'File' > 'Open', and select your document to view it securely.

Frequently Asked Questions
Why do macros run automatically when I open a Word document?
Some documents contain a specific macro named 'AutoOpen' or 'AutoExec' written in Visual Basic for Applications (VBA). These are intentionally designed by the document's author to execute specific tasks or format changes the moment the file loads.
Can I permanently remove an AutoOpen macro from a document?
Yes. After bypassing the macro using the Shift key method, press Alt+F11 to open the Visual Basic Editor. Locate the AutoOpen module in the Project pane on the left, right-click it, select 'Remove Module', and then save your document.
Is it safe to enable macros from unknown sources?
No. Macros can contain harmful code such as malware or ransomware. You should only enable macros if you completely trust the sender and understand exactly what the macro is designed to do.
Will saving the document as a standard .docx file remove the macros?
Yes. The standard .docx file format cannot store VBA macro code. If you save a macro-enabled document (.doc or .docm) as a .docx file, Word will automatically strip all macros from the file, preventing them from running in the future.




