Fix Word Disabling Macros When Opening Documents from File Explorer
Question details
The user needs to fix an issue where Word macros are disabled when opening a document directly from File Explorer, even though they work correctly when opened from within the Word application.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Opening a Word document containing macros directly from Windows File Explorer while the Word application is already running.
- Observed behavior
- Macros are unexpectedly disabled in the newly opened document, which appears to be tied to registry startup switches and Trust Center configurations.
Before modifying registry settings or startup switches, ensure you have correctly identified the startup command for your Word version and avoided enabling all macros globally in the Trust Center.
Remove the /q Startup Switch from the Registry
The /q switch suppresses the startup screen but can interfere with macro execution when opening files from File Explorer. Removing it can restore normal macro functionality.
Windows uses specific registry commands to launch Word when you double-click a file in File Explorer. If this command includes the '/q' startup switch, it can alter how Word handles macro security for that session.
Press Windows + R on your keyboard, type 'regedit' into the Run dialog box, and press Enter to launch the Registry Editor.
Navigate to the following path for .docx files: HKEY_CLASSES_ROOT\Word.Document.12\shell\Open\command. (For .doc files, look under Word.Document.8).
Right-click the '(Default)' string value in the right pane and select 'Modify'.
Look at the Value data field. If you see the '/q' switch appended to the end of the command path, carefully delete just the '/q' part and click 'OK'.

Restore Default File Association and Open Command
Resetting the default app for Word documents can automatically restore the proper file open command without incorrect startup switches.
Try WPS Office for Seamless Macro Support
If Microsoft Word's registry configurations and startup switches are causing constant macro issues when opening files from File Explorer, consider switching to WPS Office. It provides robust VBA macro support, is highly compatible with Microsoft Office formats, and offers a lightweight, easy-to-use interface without the hassle of complex registry edits.

Frequently Asked Questions
Why do my macros work when I open the file from inside Word but not from File Explorer?
When opening a file from File Explorer, Windows uses a specific registry command to launch the application. If this command includes certain startup switches like '/q', it bypasses standard startup procedures, which can inadvertently cause Word to alter or disable macro security settings for that session.
Should I just enable all macros in the Trust Center to fix this?
No, it is highly discouraged to enable all macros in the Trust Center. Doing so removes essential security prompts and leaves your computer vulnerable to malicious scripts. It is better to fix the registry command or startup switch issue instead.
Where can I get advanced help for Word VBA and registry issues?
For complex VBA troubleshooting and registry configurations, you can seek assistance on the Microsoft Q&A Word forum or the Microsoft Tech Community, where experts specialize in advanced Microsoft Office configurations.




