What macros are and why they're usually turned off
A macro is a recorded set of actions that runs automatically when you trigger it — usually a button click or opening a file. In Excel, a macro might fill in a spreadsheet template or calculate totals across sheets. In Word, it might format a document or insert standard text. Macros save time by automating repetitive work.
Microsoft Office disables macros by default because malicious files can hide harmful code inside them. A macro from an untrusted source could steal data or install unwanted software. When you open a file containing macros, Office shows a yellow warning bar asking whether to enable them. You should only enable macros in files you trust — ones you created yourself, received from a colleague you know, or downloaded from a source you recognize.
Key Takeaways
- Macros are disabled by default in Excel, Word, and PowerPoint to protect against malicious files, and you should only enable them in documents you trust.
- The fastest way to enable macros is to click the "Enable Content" button on the yellow warning bar that appears when you open a file containing them.
- If no warning bar appears, the file may be in a trusted location, or macros may be blocked at the program level and require changes to your security settings.
- You can permanently allow macros from specific folders by adding them to your trusted locations list, which is useful if you regularly work with macro-enabled files from the same source.
- Never enable macros in files from unknown senders, and be cautious even with files from known senders if you were not expecting them or if something about them seems unusual.
Enabling macros when a warning bar appears
When you open a file that contains macros, Office displays a yellow or gold bar below the ribbon with the message "Security Warning: Macros have been disabled." On the right side of this bar is a button labeled "Enable Content." Click this button to turn on the macros in that file only. The file will then run normally, and any macro-triggered actions will work as intended.
This is the most common scenario and the simplest fix. The warning appears because Office detected macro code but does not know whether to trust it. By clicking "Enable Content," you are telling Office that you have reviewed the file and want to allow it to run. This choice applies only to the current file — opening a different file with macros will show the warning again.
Enabling macros when no warning appears
Sometimes you open a file with macros and see no warning bar at all. This usually means the file is stored in a location that Office already trusts, such as a folder you added to your trusted locations list, or a network drive your organization has marked as safe. In this case, macros run automatically without asking.
If you expected a warning but did not see one, check whether the file is in a trusted location. In Excel or Word, go to File > Options > Trust Center > Trust Center Settings > Trusted Locations. You will see a list of folders where Office automatically enables macros. If the file is there, that explains why no warning appeared. If the file is not in a trusted location and you still see no warning, the macro code may be blocked at a deeper level, which requires the next step.
Changing macro security settings in Excel and Word
If you regularly work with macro-enabled files and want to stop seeing the warning each time, you can adjust your macro security level. Open Excel or Word, then go to File > Options > Trust Center > Trust Center Settings > Macro Settings. You will see four options:
- Disable all macros without notification: Macros never run, and no warning appears. Use this if you never work with macros.
- Disable all macros with notification: This is the default. Macros are blocked, but you see the yellow warning bar and can click "Enable Content" if you trust the file.
- Disable all macros except digitally signed macros: Only macros signed by a trusted publisher will run automatically. Others show the warning bar.
- Enable all macros: All macros run without warning. This is the least find option and not recommended unless you work only with files you created or fully trust.
For most people, the default setting (Disable all macros with notification) is the right choice. It protects you from accidental harm while letting you decide on a file-by-file basis. Change this setting only if you have a specific reason — for example, if your organization requires it or if you work exclusively with macro-enabled templates from a single trusted source.
Adding a folder to your trusted locations
If you have a folder where you store macro-enabled files you created or received from a trusted source, you can add that folder to your trusted locations. Files in trusted locations will run macros without showing a warning. Open Excel or Word, go to File > Options > Trust Center > Trust Center Settings > Trusted Locations, then click "Add New Location."
A dialog box will open asking you to browse to the folder you want to trust. Select the folder, then check the box that says "Subfolders of this location are also trusted" if you want to include any folders inside it. Click OK. From now on, any macro-enabled file in that folder will run macros automatically.
Use this feature only for folders you control or that belong to your organization. Do not add your Downloads folder or any location where you store files from multiple sources, because doing so removes the warning that protects you from malicious files.
Enabling macros in PowerPoint and Access
PowerPoint and Access follow the same basic rules as Excel and Word. When you open a file with macros, you will see a yellow warning bar with an "Enable Content" button. Click it to allow the macros to run in that file. The security settings are in the same location: File > Options > Trust Center > Trust Center Settings > Macro Settings.
Access also has an additional security feature called the Message Bar, which may appear even after you enable macros. If you see a message asking about unsafe expressions or blocked content, click "Open" or "Enable" to proceed. This is a separate layer of protection for database features, not the macro warning itself.
What to do if you cannot enable macros
If you try to enable macros and nothing happens, or if the "Enable Content" button is grayed out, your organization may have locked down macro settings through group policy — a system administrators use to control software on company computers. In this case, you cannot change the setting yourself. Contact your IT department or help desk and explain that you need to run macros in a specific file. They can either adjust the policy for you or add the file to an approved list.
If you are using Office on a personal computer and the button is still grayed out, try saving the file to a different location and opening it again. Sometimes Office blocks macros in files downloaded from the internet. Right-click the file, select Properties, and look for a checkbox labeled "Unblock" at the bottom of the dialog. Check it and click OK, then open the file again. This tells Windows that you trust the file and removes the internet-origin block.
Frequently Asked Questions
Is it safe to enable macros in files from people I know?
Usually yes, but not always. If a colleague sent you a file you were expecting and it came through normal email or file-sharing, it is almost certainly safe. However, if you received a file unexpectedly, or if something about it seems odd — like a file from a colleague with a slightly misspelled name in the sender address — do not enable macros. Ask the person directly whether they sent it before opening it.
What if I enable macros and something bad happens?
If you enable macros and your computer starts behaving strangely — files disappearing, programs crashing, or unusual network activity — disconnect from the internet when ready and run a full antivirus scan. Most modern antivirus software will catch malicious macros, but it is better to be cautious. If you suspect a file is harmful, delete it and report it to the person who sent it.
Can I see what a macro does before I enable it?
Yes, but it requires some technical knowledge. Open the file, then press Alt+F11 to open the Visual Basic editor. You will see the code that makes up the macro. If the code is straightforward and you understand it, you can decide whether it is safe. If it is complex or you do not recognize the commands, ask the person who created the file to explain what it does before you enable it.
Do I need to enable macros every time I open a file?
No. Once you click "Enable Content" for a file, that choice is remembered for that specific file. The next time you open it, macros will run without asking. However, if you open a different file with macros, you will see the warning again because Office treats each file separately.
Why would I want to disable all macros permanently?
If you never use macros and want to eliminate any risk, you can set macro security to "Disable all macros without notification." This prevents any macro from running, ever. Choose this only if you are certain you will never need macros, because some templates and specialized documents rely on them to function.