How to Turn On Macros in Word: Step-by-Step Guide
In this article
To turn on macros in Word, you need to enable the Developer tab, set the macro security level to allow macros, and then open or create a macro-enabled document. The exact steps depend on your version of Word (Microsoft 365, Word 2019, 2016, etc.) and your operating system (Windows or Mac). Below is a complete walkthrough for Windows, with notes for Mac where they differ. Menu labels can vary slightly by version, device, or region, so look for the closest match if a name is not identical.
What You'll Need
- Microsoft Word installed on your computer (Windows or Mac).
- Administrator rights may be required to change Trust Center settings on a work computer.
- A macro-enabled document (.docm) or a template (.dotm) if you plan to run an existing macro. Standard .docx files cannot store macros.
Step-by-Step
- Open Word and go to File > Options. On Mac, go to Word > Preferences. This opens the settings dialog where you control macro behavior.
- Select Trust Center (or Security & Privacy on Mac), then click Trust Center Settings. This is where macro security levels live. On Mac, look for the Macro Security button.
- Choose Macro Settings. You will see options such as Disable all macros without notification, Disable all macros with notification, Disable all macros except digitally signed macros, and Enable all macros (not recommended).
- Select "Disable all macros with notification" if you want to be prompted each time a document contains macros. This is the safest setting that still lets you run macros you trust. Avoid "Enable all macros" unless you fully understand the risk; it allows any macro to run without warning.
- Click OK to save the setting. Close and reopen Word so the change takes effect.
- Enable the Developer tab. Go to File > Options > Customize Ribbon. In the right-hand list of main tabs, check the box next to Developer, then click OK. On Mac, go to Word > Preferences > Ribbon & Toolbar and check Developer.
- Open a macro-enabled document. If you have an existing .docm file, open it. If you are starting fresh, go to File > Save As and choose "Word Macro-Enabled Document (*.docm)" as the file type. A standard .docx will discard any macros you record.
- Enable content when prompted. When you open a .docm file, a yellow security warning bar may appear saying "Macros have been disabled." Click "Enable Content" to allow macros for that session. Only do this for files from a trusted source.
- Record or run a macro. On the Developer tab, click Record Macro to create a new one, or Macros to view and run existing ones. Give your macro a name (no spaces), choose where to store it (This Document or Normal.dotm), and click OK to start recording.
- Save your work. Macros are stored only in .docm or .dotm files. If you save as .docx, Word will warn you that macros will be lost.
Common Mistakes
- Saving as .docx instead of .docm. Macros are stripped out. Always use "Word Macro-Enabled Document" when macros are involved.
- Leaving macro security on "Enable all macros." This removes the warning that protects you from malicious macros. Keep it on "Disable all macros with notification" and enable content per file.
- Forgetting to enable the Developer tab. Without it, you cannot easily record or manage macros. It is hidden by default.
- Clicking "Enable Content" on unknown files. Macros can run harmful code. Only enable macros in files you trust or that come from a verified source.
- Expecting macros to work in Word Online. The browser version of Word does not support running or recording macros. Use the desktop app.
Tips
- Store frequently used macros in Normal.dotm so they are available in all documents, but be aware that this template can become corrupted; keep a backup.
- Use the Macro dialog (Developer > Macros) to edit, rename, or delete macros. You can also assign a macro to a keyboard shortcut or a button on the Quick Access Toolbar.
- Digitally sign your macros if you share them. A digital signature lets others trust the macro without lowering their security settings.
- Test macros on a copy of your document first, especially if they modify content or formatting.
- If you work in an organization, group policy may override your Trust Center settings. Check with your IT administrator if options are greyed out.
Troubleshooting
If macros still will not run, work through these checks in order:
- The Developer tab is missing. Re-check File > Options > Customize Ribbon and ensure Developer is checked in the right pane. On Mac, check Ribbon & Toolbar preferences.
- The "Enable Content" bar does not appear. Your macro security may be set to "Disable all macros without notification." Change it to "Disable all macros with notification" in Trust Center > Macro Settings.
- Macros are disabled by policy. In managed environments, an administrator can block macros entirely. The settings will be greyed out; contact IT.
- The file opens in Protected View. Files downloaded from the internet open in Protected View, which blocks macros. Click "Enable Editing" first, then "Enable Content." Only do this for trusted files.
- You saved as .docx. Re-save as .docm and re-record or re-import the macro.
- Word is unresponsive or macros cause errors. Restart Word. If the problem persists, try opening Word in safe mode (hold Ctrl while launching on Windows) to rule out add-ins. Disable suspicious add-ins via File > Options > Add-ins.
- Macro settings are greyed out on Mac. Check System Settings > Privacy & Security and ensure Word has necessary permissions, or consult your organization's IT.
Frequently Asked Questions
Can I turn on macros in Word Online?
No. Word for the web does not support running or recording macros. You need the desktop version of Word.
What is the safest macro setting?
"Disable all macros with notification" is the recommended balance: macros are blocked by default, but you can enable them per document when you trust the source.
Why do my macros disappear after saving?
You likely saved the file as .docx. Macros require the .docm format (or .dotm for templates). Use Save As and choose the macro-enabled format.
How do I run a macro I downloaded?
Open the .docm file, click "Enable Content" on the security bar, then go to Developer > Macros, select the macro, and click Run. Only do this if you trust the file's source.
Can I enable macros for just one document?
Yes. With the "Disable all macros with notification" setting, each document prompts you separately. Clicking "Enable Content" applies only to that file for the current session.
Do macros work on Word for Mac?
Yes, Word for Mac supports VBA macros. The menu paths differ slightly (Word > Preferences > Security & Privacy), but the concepts are the same.