Office Settings & Configuration

How to Stop Word Macros from Running Automatically on Startup

Aamir Naveed AkramAamir Naveed Akram Nov 3, 2026 870 views

Question details

The user needs to prevent embedded macros from executing automatically when a Word document is opened.

How to Stop Word Macros from Running Automatically When a Document Opens
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.
Before you start

Ensure you know the source of the document before modifying macro settings. Unexpectedly expanding documents can sometimes indicate malicious macros or unstable VBA scripts.

Solution 1Recommended

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.

1
Launch Microsoft Word

Open the Microsoft Word application from your desktop or Start menu, but do not open the specific macro-enabled document just yet.

2
Navigate to the Open Menu

Click on 'File' in the top ribbon and select 'Open'. Browse to the folder containing the document you want to open.

3
Hold the Shift Key

Select the file. Before clicking the 'Open' button, press and hold down the left 'Shift' key on your keyboard.

4
Open the Document

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.

Bypass Automatic Macros Using the Shift Key
Review Macro Code Safely: Once the document is open, you can press Alt+F11 to access the VBA Editor and manually delete the troublesome AutoOpen macro before saving the file again.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS website and download the free WPS Office installation package.
  2. 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to set up the software.
  3. 3. Open Your Files Safely: Launch WPS Writer, click 'File' > 'Open', and select your document to view it securely.
Highly compatible with Microsoft Word (.docx, .doc, .docm) formatsClear, intuitive security prompts to prevent unauthorized script executionLightweight application that runs smoothly even on older devicesFree to download and easy to use with a familiar tabbed interface
QA img-9

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.