When you open a file in Excel, Word, or PowerPoint, you might see a red banner across the top. It says: “SECURITY RISK: Microsoft has blocked macros from running because the source of this file is untrusted.” Unlike the older yellow warning bar, this red banner has no button to turn the macros back on.
If you did not expect this file, close it and delete it. Do not unblock a file unless you know who sent it and why it needs macros.
Why it matters
An Excel macro is a small program built inside a document or spreadsheet. People use macros to automate repetitive tasks, like adding up a monthly budget or formatting a long table.
Because macros are small programs, criminals sometimes hide harmful code inside them. When you download a file from a website or save it from an email, Windows attaches a hidden tag to that file to show it came from the internet. When Microsoft Office sees that tag, it stops any macros inside the file from running and shows the red banner instead1.
File name: Shipping_Notice_8812.xlsm - Excel
SECURITY RISKMicrosoft has blocked macros from running because the source of this file is untrusted.
Learn MoreThis document is protected
To view it, follow the steps in the email to unblock this file, then open it again.
Red flags in this file
This built-in rule is a helpful part of keeping your phones and computers safe. Most everyday files—like receipts, tax forms, or shipping notices—do not need macros at all. If a stranger sends you an unexpected invoice attachment and the email includes instructions on how to unblock the file, it is a trap.
What to do
Use this guide to decide what to do with the file on your screen.
Should you unblock this file?
Did you expect to receive or download this specific file?
If you do not trust the file
Close the file in Excel, Word, or PowerPoint.
Delete the file from your computer’s Downloads folder or wherever you saved it.
Delete the email it came in.
So long as Microsoft blocked the macros and you did not unblock the file, the macro code did not run.
If you are certain the file is safe
Sometimes a file you trust—such as a club budget from a friend or an older spreadsheet you downloaded from your own cloud storage—needs macros to work properly. You can remove the block for that single file in Windows.
Save any changes and close the file in Excel, Word, or PowerPoint.
Open File Explorer (the folder icon on your taskbar) and find the file.
Right-click the file and select Properties from the menu.
At the bottom of the General tab, look for the Security section.
Check the box next to Unblock.
Click OK.
Open the file again. If a yellow bar appears asking you to Enable Content, click it to let the macros run.
Common questions
Why is a workbook that worked on my old computer blocked now?
Microsoft added the red banner rule in recent versions of Office, including Microsoft 365. If you move an old macro file to a new computer by emailing it to yourself or downloading it from the internet, Windows marks it as coming from outside your computer and blocks the macros.
What if the Unblock box is missing or the red banner stays?
If the file is stored in a shared network folder or a work account, Windows may treat that whole folder as an untrusted internet location. If you see a message saying your administrator has restricted macros, a workplace rule is blocking them. You will need to ask the person who manages that computer or network for help.