Macros can add a lot of functionality to Office, but they are often used by people with bad intentions to distribute malware to unsuspecting victims.

Macros aren't required for everyday use like reading or editing a document in Word or using Excel workbooks. In most cases you can do everything you need to do in Office without allowing macros to run.

Note: If you're an IT pro looking to configure this setting, or if you just want more advanced technical details, see Macros from the internet will be blocked by default in Office.

What should I do now?

Still wondering if you should proceed?

  • Were you expecting to receive a file with macros? Never open a file attachment you weren't expecting, even if it appears to come from somebody you trust. Phishing attacks often appear to come from a person or organization you trust in an effort to get you to open them.

  • Are you being encouraged to enable content by a stranger? A common tactic of attackers is to create some pretense such as cancelling an order or reading a legal document. They'll have you download a document and try to persuade you to allow macros to run. No legitimate company will make you open an Excel file to cancel an order and you don't need macros just to read a document in Word.

  • Are you being encouraged to enable content by a pop-up message? If you downloaded the file from a website, you may see pop-ups or other messages encouraging you to enable active content. Those are also common tactics of attackers and should make you suspicious that the file is actually unsafe.

If a downloaded file from the internet or a file opened from a network share wants you to allow macros, and you're not certain what those macros do, you should probably just delete that file. 

If you’re sure the file is safe and want to unblock macros

There are a few different ways to do it, depending on your situation.

Unblock a single file

In most cases you can unblock macros by modifying the properties of the file as follows:

  1. Open Windows File Explorer and go to the folder where you saved the file.

  2. Right-click the file and choose Properties from the context menu.

  3. At the bottom of the General tab, select the Unblock checkbox and select OK.

In file properties, near the bottom of the General tab, is a Security section with a checkbox for unblocking the file.

If you don't see the Unblock checkbox in properties, then try one of the options below. 

Unblock all files from a specific network share or website

If you often download files or directly open files from a trusted cloud location, such as your company’s website or an internal file server, you can set the site as a trusted site in Windows so macros from the site won’t be checked. 

Important: You’ll trust all the macros from this site if you choose to apply this setting, so only do this if you know that every file opened from this location is trustworthy.

  1. Tap the start button or Windows key and type Internet Options.

  2. Select Internet Options from the search results and the Internet Properties dialog box will appear.

  3. On the Security tab, select Trusted Sites, then select Sites.

  4. Type the URL of the site or server that contains the Office files with the macros you want to run, and then select Add.

    Note: If you want to add URLs that begin with http:// or network shares, uncheck Require server verification (https:) for all sites in this zone.

  5. Select Close and then OK.

    Adding a trusted site in internet properties

Select a heading below for more information  

If the file you want to trust was sent to you through email, you can:

  • Save it to your OneDrive before opening it.

    -or-

  • Save it to your computer’s hard drive then follow the instructions for unblocking a single file, above.

If you have a specific folder on your computer with many files that are blocked, and you want to trust every file in this folder, you can add it as a Trusted Location.

Warning: You should only do this if you know that every file saved here is trustworthy.

In your Office app: 

  1. Select File > Options.

  2. Select Trust Center > Trust Center Settings > Trusted Locations.

  3. Select Add new location.

  4. Select Browse to find the folder, select a folder, and then select OK.

If you're comfortable that the source of the macros is a person or company that you know you can add them as a trusted publisher to unblock this macro and any future macros the publisher signs with the same certificate.

First, you'll need to unblock this particular file using the steps above, Then, you can add the publisher as a trusted publisher so that future macros will run seamlessly.

See Add, remove, or view a trusted publisher for more information.

Still unable to unblock the macro? 

Visit the Microsoft Answers community to see what others have said or ask your own questions.

Learn more

Macros in Office files

How malware can infect your PC

Microsoft security help & learning

Need more help?

Expand your skills

EXPLORE TRAINING >

Get new features first

JOIN MICROSOFT INSIDERS >

Was this information helpful?

What affected your experience?

Thank you for your feedback!

×