How to Enable Macros in Excel, Word, and Other Office Apps
Macros are one of those features that sound intimidating at first but make a lot of sense once you understand what they actually do. If you've opened a file and seen a yellow warning bar, or if you're trying to automate repetitive tasks and can't figure out why nothing is running, this guide walks you through how enabling macros works — and why the process varies depending on your setup.
What Is a Macro, and Why Is It Disabled by Default?
A macro is a saved sequence of commands or actions that runs automatically. In Microsoft Office apps like Excel and Word, macros are written in VBA (Visual Basic for Applications) — a lightweight scripting language built into the Office suite. When a macro runs, it can do things like format data, generate reports, send emails, or manipulate files.
Because macros can execute code on your system, they're also a well-known attack vector. Malicious actors have used macro-enabled documents to deliver malware for decades. That's exactly why Microsoft, Google, and other software vendors disable macros by default — it's a security decision, not a bug.
Understanding this tradeoff is the starting point for everything else.
How to Enable Macros in Microsoft Excel or Word
The most common place people need to enable macros is Microsoft Office — particularly Excel (.xlsm files) and Word (.docm files).
Option 1: Enable Macros for a Single File (One-Time Prompt)
When you open a macro-enabled document, Office typically shows a yellow security warning bar at the top of the screen with a button that says Enable Content. Clicking that button enables macros for that specific file in that session. This is the safest and most common method for trusted documents.
Option 2: Enable Macros Through Trust Center Settings
If you want to change macro behavior more broadly:
- Open Excel or Word
- Go to File → Options → Trust Center
- Click Trust Center Settings
- Select Macro Settings from the left panel
- Choose your preferred option
| Setting | What It Does |
|---|---|
| Disable all macros without notification | Macros are blocked silently |
| Disable all macros with notification | Default — shows the warning bar |
| Disable all macros except digitally signed | Only runs macros from verified publishers |
| Enable all macros | All macros run automatically — highest risk |
For most users, staying on "Disable all macros with notification" and manually approving trusted files is the recommended approach.
Option 3: Add a Trusted Location
If you regularly work with macro-enabled files from a specific folder (say, internal company templates), you can designate that folder as a Trusted Location in the Trust Center. Files opened from trusted locations bypass the macro warning entirely.
Enabling Macros in Microsoft 365 (Cloud and Desktop)
📋 Microsoft 365 behaves slightly differently depending on whether you're using the desktop app or working through a browser.
The desktop version of Microsoft 365 follows the same Trust Center path described above. The web version (Office Online) does not support VBA macros at all — macros simply don't run in a browser environment. If your workflow depends on macros, you need the locally installed version.
Microsoft also introduced a significant change starting in 2022: macro-enabled files downloaded from the internet are now blocked more aggressively, even if you click "Enable Content." The file's origin (tracked via Windows' Mark of the Web metadata) determines whether the option to enable macros even appears. To work around this, you may need to unblock the file at the Windows level — right-click the file, go to Properties, and check the Unblock checkbox under the General tab before opening it.
Enabling Macros in Google Sheets (Apps Script)
Google Sheets uses Google Apps Script instead of VBA, but the concept is similar. To record or run a macro in Google Sheets:
- Go to Extensions → Macros → Record Macro (to create one) or Manage Macros (to run existing ones)
- When running a script for the first time, Google will ask you to authorize permissions — this is their equivalent of the macro trust prompt
- Review what the script is requesting access to before approving
Google's authorization model is tied to your Google account, so permissions are granted per script, per account.
Enabling Macros in LibreOffice
LibreOffice handles macros through a separate Security Level setting:
- Go to Tools → Options → LibreOffice → Security → Macro Security
- Set the level to Medium to receive a prompt when macros are present, or Low to allow all macros (not recommended for general use)
LibreOffice supports both its own Basic scripting language and limited VBA compatibility, which matters if you're opening files originally created in Microsoft Office.
The Variables That Change Your Experience
🔧 How macro enabling actually works for you depends on several factors that aren't always obvious:
- Office version: Older versions of Office (2010, 2013) have different default behaviors than Microsoft 365 or Office 2021
- File origin: Files downloaded from the internet face stricter controls than files created locally or received via internal networks
- IT/organizational policies: On work-managed devices, macro settings are often locked by Group Policy — individual users may not have the ability to change them at all
- Operating system: Mac versions of Office have their own macro security settings, and some features available on Windows aren't present on macOS
- File format: Only macro-enabled file types (.xlsm, .xlsb, .docm) can contain active macros — standard .xlsx or .docx files cannot run them even if settings are permissive
Someone using a personal laptop with a locally saved Excel file has a completely different experience enabling macros than someone on a corporate machine trying to run a downloaded template. The steps look the same on the surface, but the underlying constraints are different in ways that aren't always visible until something doesn't work as expected.