Macros are turned on differently depending on which program you use
A macro is a recorded sequence of actions that a program plays back automatically — like a keystroke shortcut that does ten things at once. Microsoft Office and Google Workspace handle macro security very differently. Microsoft Office asks you to approve macros before they run, because macros can be written to do harmful things. Google Workspace doesn't use traditional macros the same way, but it has a similar feature called Apps Script that works through a different process. The steps below cover the most common scenario: enabling macros in Microsoft Word, Excel, or PowerPoint on Windows or Mac.
Key Takeaways
- Microsoft Office shows a yellow security bar when a document contains macros; you click "Enable Content" to turn them on for that file only.
- If you want to trust all macros from a specific person or folder, you can add them to your trusted locations or trusted publishers in Office settings.
- Macros are disabled by default in Microsoft Office because they can carry malware, so only enable them for documents you recognize and trust.
- Google Sheets and Docs don't use macros in the traditional sense; instead they use Apps Script, which you access through the Extensions menu.
- Never enable macros in a document from an unknown sender, even if the document looks legitimate.
Enabling macros in Microsoft Word, Excel, or PowerPoint
When you open a Microsoft Office document that contains macros, you'll see a yellow bar below the ribbon that says "Security Warning: Macros have been disabled." Click the button labeled "Enable Content" on that bar. The macros will then run in that document for the rest of your session. This is the simplest and safest approach because it only affects the one file you're working with right now.
If you close the document and reopen it later, the same yellow bar will appear again. Office doesn't remember your choice across sessions. This is intentional — it forces you to make a conscious decision each time, which reduces the risk of accidentally running a macro you didn't intend to.
Trusting a specific person or folder permanently
If you work with macros from the same person or folder regularly, you can add that source to your trusted list so macros run automatically without the yellow bar appearing. In Word, Excel, or PowerPoint, go to File > Options > Trust Center > Trust Center Settings. On the left side, click "Trusted Locations" to add a folder, or "Trusted Publishers" to trust macros signed by a specific person or company.
For a trusted location, click "Add New Location" and browse to the folder where you keep those documents. Any macro-enabled file in that folder will run without prompting. For a trusted publisher, you need the document to be digitally signed by that person — you'll see their name in the security bar instead of a generic warning. This approach is useful in a workplace where your IT department or a specific colleague regularly sends you macro-enabled spreadsheets.
Changing your macro security level (not recommended)
Microsoft Office has a master setting for how strictly it handles all macros. You can find this in File > Options > Trust Center > Trust Center Settings > Macro Settings. The default is "Disable all macros with notification," which shows you the yellow bar. You can change it to "Disable all macros without notification" (stricter) or "Enable all macros" (much less safe).
Most people should leave this at the default. Changing it to "Enable all macros" means any document you open, from anyone, will run its macros silently in the background. This is how malware spreads. Only change this setting if you work in an environment where every document comes from a trusted internal source and your IT team has told you to do so.
Using macros in Google Sheets and Docs
Google Sheets and Docs don't have traditional macros. Instead, they use a feature called Apps Script, which is a programming language built into Google Workspace. To create or run an Apps Script macro, open your spreadsheet or document and go to Extensions > Apps Script. This opens a code editor where you can write or paste scripts.
Unlike Microsoft Office macros, Apps Scripts are stored in your Google Drive and tied to your account, not embedded in the document itself. When you share a document with someone, they won't see or run your scripts unless you explicitly give them permission. If someone sends you a Google Sheet with a script attached, you'll see a notification at the top of the sheet. You can view the script by going to Extensions > Apps Script, but it won't run automatically.
Why macros are disabled by default
Macros are powerful because they can do almost anything a person could do manually — including stealing data, installing software, or changing file contents. Malware writers have used macros for decades to spread viruses through email attachments. A document that looks like an innocent invoice or resume can contain a macro that runs the moment you open it.
Microsoft's approach of disabling macros by default and requiring you to click "Enable Content" is a speed bump, not a wall. It stops accidental infections and casual malware, but someone determined to trick you might use social engineering — for example, a fake email saying "You must enable macros to view this document" to pressure you into clicking. The safest rule is simple: only enable macros in documents you recognize, from people you trust, for a reason you understand.
What to do if you see a macro warning but don't remember creating one
If you open a document you created yourself and see the macro warning, it means the document contains a macro you may have forgotten about or that was added by someone else. Open the document in a text editor or use File > Properties to check who last edited it and when. If you don't recognize the edit, don't enable the macros — save a copy without macros instead.
In Microsoft Office, you can remove macros from a document by going to File > Info > Inspect Document > Inspect, then clicking "Remove All" next to "Macros." This strips out all macros and leaves the rest of the document intact. Use this if you've received a document with macros you don't need or don't trust.
Frequently Asked Questions
Can I enable macros for just one person's documents?
Yes, if their documents are digitally signed. Add them as a Trusted Publisher in File > Options > Trust Center > Trust Center Settings. After that, any document they sign will run macros without the yellow bar. Unsigned documents from the same person will still show the warning.
What happens if I enable a macro and it does something bad?
Undo the action immediately with Ctrl+Z (or Cmd+Z on Mac). Close the document without saving. If you're concerned the macro installed malware, run a full antivirus scan. Most modern antivirus software will catch macro-based malware, but it's not may provide.
Do I need to enable macros every time I open the same document?
Yes, unless you add the document's folder to your Trusted Locations or the creator to your Trusted Publishers. Otherwise, the yellow bar appears each time you open it. This is by design — it prevents you from forgetting that the document contains code.
Can I use macros in Microsoft Office on a Mac?
Yes. The process is the same: you'll see the yellow bar, click "Enable Content," and the macros run. The Trust Center settings are in Word > Preferences > Security instead of File > Options, but the logic is identical.
Is it safe to enable macros from my company?
Usually yes, if your company's IT team has told you to expect them. But verify the document came through your company's official email system, not from a suspicious external sender claiming to be from your company. Scammers often impersonate internal colleagues to trick you into enabling malicious macros.