How to enable macros blocked by Microsoft

Megan LeNoue 0 Reputation points
2026-05-28T01:36:19.7466667+00:00

I'm unable to enable the macros on a file I downloaded due to Microsoft blocking them from running. I trust the excel file I downloaded and need the macros enabled to properly use the workbook.

I already went into Properties and clicked Unblock.

I already added the file folder as a Trusted Location.

Still the macros are blocked. How can I enable the macros blocked by Microsoft?

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Darren-Ng 12,765 Reputation points Microsoft External Staff Moderator
    2026-05-28T02:47:34.14+00:00

    Dear @Megan LeNoue,

    Thank you for posting your question in the Microsoft Q&A forum.

    Based on your description, you wonder how enable macros in an Excel file that are still blocked by Microsoft even after unblocking the file and adding the folder as a Trusted Location.

    Here are some suggestions you can try:

    Even if the file is unblocked and stored in a Trusted Location, macros can still be blocked due to security policies or the Mark of the Web. Verifying Trust Center settings and checking for organizational restrictions maybe the effective solutions to resolve the issue.

    Check Group Policy or Organizational restrictions

    Go to:

    File > Options > Trust Center > Trust Center Settings > Macro Settings

    User's image

    Make the selections that you want, then select OK

    For more detail information, you can refer to this article Enable or disable macros in Microsoft 365 files

    Remove Mark of the Web

    If the file was downloaded:

    • Extract the file from a ZIP using “Extract All” (instead of drag-and-drop), or
    • Save the file to a local location using a trusted source (e.g., internal SharePoint/OneDrive)

    I hope information above meet your expectations, feel free to reach out if you have any other questions.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


  2. AI answer

    2026-05-28T01:36:45.16+00:00

    Because the file was downloaded from the internet, macros are being blocked by the “Block macros from running in Office files from the Internet” protection and/or related macro policies, even though the file is unblocked and in a Trusted Location.

    Use the following checks and changes in order:

    1. Confirm Mark of the Web is really removed
      1. Close Excel.
      2. In File Explorer, right‑click the workbook > Properties.
      3. On the General tab, verify the Security section and the Unblock checkbox are no longer shown. If they still appear, check Unblock again and select OK.
      4. Alternatively, an admin can run the PowerShell cmdlet Unblock-File on the workbook to remove the ZoneId (Mark of the Web). Removing the ZoneId allows VBA macros to run by default, as long as no policy or Trust Center setting is blocking them.
    2. Check if the file is still treated as “from the Internet”
      1. An admin can inspect the ZoneId by opening a Command Prompt and running:
              notepad {file-name}:Zone.Identifier
        
      2. In the Notepad window, look under [ZoneTransfer]:
        • ZoneId 3 = Internet → macros are blocked by default.
        • ZoneId 4 = Restricted sites → macros are blocked by default.
        • ZoneId 0–2 (My Computer, Local intranet, Trusted sites) → macros are not blocked by default.
      3. If ZoneId is 3 or 4, remove it using Unblock-File or the Unblock checkbox.
    3. Ensure the file is opened in a way that avoids Mark of the Web If the workbook is on OneDrive or SharePoint:
      • Use Open in Desktop App directly from OneDrive/SharePoint. Files opened this way do not get Mark of the Web.
      • Alternatively, sync the library with the OneDrive sync client and open the synced file from a known folder (for example, Documents). Files synced this way do not have Mark of the Web.
    4. Verify Excel macro settings and Trusted Documents
      1. In Excel, go to File > Options > Trust Center > Trust Center Settings… > Macro Settings and confirm macros are not set to “Disable all macros without notification.”
      2. Open the workbook again. If a Security Warning bar with Enable Content appears, select Enable Content and confirm the document as trusted. The file then becomes a Trusted Document and macros will continue to run on that file.
    5. Check for organization‑level macro policies If macros are still blocked with a SECURITY RISK banner and no Enable Content button:
      • An administrator may have enabled the Block macros from running in Office files from the Internet policy for Excel under:
        • User Configuration > Policies > Administrative Templates > Microsoft Excel 2016 > Excel Options > Security > Trust Center.
      • With this policy enabled, macros in files with Mark of the Web are blocked and users cannot override it.
      • The admin can either:
        • Remove or relax this policy for specific users, or
        • Use the VBA Macro Notification Settings policy instead, which allows users to choose Enable Content and make the file a Trusted Document.
    6. Consider Trusted Sites / Trusted Locations centrally If the workbook is stored on SharePoint or OneDrive and must be used with macros by a group (for example, a department):
      • An admin can add the SharePoint/OneDrive domain to the Trusted Sites zone using the Site to Zone Assignment List policy.
      • Users can also download the file into a Trusted Location that has been configured in Office so that macros are not blocked there.

    If, after these steps, macros remain blocked, the most likely cause is a mandatory organization policy that prevents enabling macros in files from the internet; in that case, only the Microsoft 365 administrator can change the policy or provide an alternative (such as distributing the workbook from a location that is not tagged as Internet/Restricted).


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.