Software & OS

How to Enable Macros in Word (Banner, Unblock, Trust Center)

To enable macros in Word, click Enable Content on the yellow security warning bar under the ribbon. If the bar is red, says Security Risk and has no such button, close the document, right-click it in File Explorer, open Properties, tick Unblock, and open it again.

Which method applies depends on the banner Word shows when you open the file. Only enable macros in a document when you are sure you know what its macros do. Microsoft's guidance is that you don't need to enable macros just to view or edit a file. If you are unsure what a macro is, what macros are explains it. The same steps for a spreadsheet are in how to turn on macros in Excel.

Enable macros from the yellow security warning bar

This is the normal route for a file that did not come from the internet, or one that has already been unblocked.

  1. Open the document. A warning bar appears saying macros have been disabled.
  2. Select Enable Content.
  3. If a Security Warning dialog appears, click Yes to mark the document as trusted.

Word now treats the file as a Trusted Document, and its macros are allowed to run. Microsoft notes that this stays true later: the macros keep running because the file is still a Trusted Document.

Fix the red "Security Risk" banner (no Enable Content button)

Windows adds a marker called Mark of the Web to files from untrusted places, such as browser downloads and email attachments. Since Microsoft changed the default behavior, Office on Windows blocks macros in files that carry that marker. When Word opens such a file, it shows a Security Risk banner saying Microsoft blocked macros from running because the source of the file is untrusted. The banner has a Learn More button and no Enable Content button.

Microsoft says this change applies only to Office on Windows, and to these apps: Access, Excel, PowerPoint, Project, Publisher, Visio and Word. To unblock a document you trust:

  1. Close the document in Word.
  2. In File Explorer, right-click the file and choose Properties.
  3. On the General tab, tick Unblock, then select OK.
  4. Open the file again.

This removes Mark of the Web from your local copy. Per Microsoft, the macros then run as long as no policy or Trust Center setting is blocking them. The PowerShell equivalent is Unblock-File, which Microsoft says does the same thing as the checkbox by removing the ZoneId value from the file:

Unblock-File -Path "C:\work\report.docm"

Replace the path with your own file.

Check whether a file has Mark of the Web

Microsoft gives a way to see the marker. At a command prompt, run the following, replacing the file name with yours:

notepad report.docm:Zone.Identifier

Notepad opens and shows the ZoneId under the [ZoneTransfer] heading. The documented values are 0 for My Computer, 1 for Local intranet, 2 for Trusted sites, 3 for Internet and 4 for Restricted sites. Macros are blocked by default for a ZoneId of 3, and not for 2. By default, Windows adds the marker only for the Internet and Restricted sites zones. Microsoft also notes that it applies only to files on an NTFS file system, not to files on FAT32 devices. A file on a FAT32 USB stick therefore never gets the red banner for this reason.

If there is no Unblock checkbox

Files on a network share sometimes show no Unblock checkbox. Even when it appears, ticking it has no effect if the share is considered part of the Internet zone. A share opened by its IP address is blocked unless it is in the Trusted sites or Local intranet zone. Microsoft's options are to designate the location as a trusted site or, for an intranet location, add it to the Local intranet zone. Microsoft warns that trusting a site gives the whole site elevated permissions for things unrelated to Office, so ask your IT team before doing it.

Files from OneDrive or SharePoint

Microsoft lists several cases. A file opened with Open in Desktop App from the OneDrive website or a SharePoint site has no Mark of the Web. Neither does a file downloaded by the OneDrive sync client. A file downloaded through a web browser may get the marker, depending on your Windows internet security zone settings. If you downloaded it, use the Unblock steps above.

Change macro settings in Word's Trust Center

  1. Select File > Options.
  2. Select Trust Center, then Trust Center Settings.
  3. Select Macro Settings.
  4. Choose an option and select OK.

If the Developer tab is on your ribbon, Macro Security there opens the same page. Microsoft says changes apply only to the app you are currently using, so changing the setting in Word does not change it in Excel.

SettingWhat it does
Disable all macros without notificationMacros are off and Word does not offer to turn them on.
Disable all macros with notificationMacros are off, and the warning bar lets you enable them. This is the default.
Disable all macros except digitally signed macrosOnly macros from a trusted publisher run.
Enable all macros (not recommended; potentially dangerous code can run)All macros run with no prompt.

The page also has a checkbox, Trust access to the VBA project object model. Choosing the last option does not make the red banner go away: Microsoft's flowchart checks policies and then blocks macros in internet files in the last step, so unblock the file as well.

Trust a folder instead: Trusted Locations

A Trusted Location is a folder for files you trust. Microsoft says files from the internet that are saved there skip the Mark of the Web check and open with VBA macros enabled, so you don't have to tick Unblock every time. Microsoft recommends using Trusted Locations sparingly and advises against making a network location trusted. Choose a folder that only you can write to.

If macros still don't run

  • Your organization manages the device. An administrator may block changes to macro settings. Microsoft documents a policy for Word, Block macros from running in Office files from the Internet, under Microsoft Word 2016\Word Options\Security\Trust Center in Group Policy. Microsoft says policies are available for Microsoft 365 Apps for enterprise but not for Microsoft 365 Apps for business.
  • The file is a macro-enabled template. Downloaded Word templates with the extensions .dot and .dotm carry Mark of the Web and are blocked. Microsoft's fix is to unblock the template and reopen it in Word, or save it to a Trusted Location.
  • The setting hides the bar. If Macro Settings is Disable all macros without notification, no bar appears. Change it to the notification option.
  • The macro is signed. If it has a valid digital signature and its publisher is trusted, the file opens with macros enabled. Adding a trusted publisher is a Windows-wide setting, so only do it for a publisher whose certificate you have checked.

Frequently asked questions

Why is there no Enable Content button in Word?
On Windows, Office blocks macros in files from the internet, such as browser downloads and email attachments. Those files show a Security Risk banner that has a Learn More button but no Enable Content button. Close the file, right-click it in File Explorer, choose Properties, tick Unblock on the General tab, select OK, and open it again.
Is it safe to enable macros in Word?
Only if you are sure of the file's source and what its macros do. Microsoft states that VBA macros are a common way for attackers to deploy malware and ransomware, and that you don't need to enable macros to view or edit a file.
Does Word on Mac or Word for the web block macros the same way?
No. Microsoft states that the internet-macro blocking change affects Office on Windows only. It doesn't affect Office on a Mac, Office on Android or iOS, or Office on the web.
How do I enable macros in every Word document?
Open File, Options, Trust Center, Trust Center Settings, Macro Settings and choose Enable all macros. Microsoft labels this option not recommended because potentially dangerous code can run. Saving trusted files in a Trusted Location is a narrower alternative.
Why can't I change the macro settings in Word?
If your work or school manages the device, an administrator may block these changes. Microsoft also notes that policies for macro handling exist for Microsoft 365 Apps for enterprise, so ask your IT team.

Sources