How to unblock macros

HE 0 Reputation points
2025-12-08T22:53:25.66+00:00

I have a trusted .xlsm which Microsoft has blocked since the source is untrusted. I tried three ways to get the Macros unblocked with no luck.

  1. Added the website to a safe list.
  2. Unblocked Macros in properties
  3. Verified that Macros were enabled in Windows Settings of Excel
Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-08T22:54:35.13+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To unblock macros in your trusted .xlsm file, you can follow these steps:

    1. Remove the Mark of the Web: Right-click on the file, select Properties, and then check the Unblock checkbox on the General tab. This is necessary if the file has been marked as coming from an untrusted source.
    2. Use PowerShell: If the Unblock checkbox is not available, you can use the PowerShell cmdlet Unblock-File to remove the ZoneId value from the file. This cmdlet effectively does the same thing as unblocking the file through the properties dialog.
    3. Check Trusted Locations: Ensure that the location of the file is added as a Trusted site or is part of the Local intranet zone. You can do this through the Control Panel > Internet Options > Security settings. If the file is on a network share, ensure that the share is designated as a Trusted site.
    4. Open in Desktop App: If the file is stored on OneDrive or SharePoint, try opening it directly in the Desktop App instead of through the browser.

    These steps should help you unblock the macros in your trusted file. If you continue to face issues, ensure that no group policies or Trust Center settings are preventing macros from running.


    References:

    0 comments No comments

  2. Darren-Ng 5,965 Reputation points Microsoft External Staff Moderator
    2025-12-09T01:30:17.58+00:00

    Dear @HE,

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

    Based on your description, you’re facing an issue where a trusted .xlsm file is blocked by Microsoft as coming from an untrusted source, and previous attempts to unblock macros have not worked.

    Here are some suggestions you can try:

    Remove the “Mark of the Web”

    Files downloaded from the internet or email often carry a security tag that blocks macros.

    • Right-click the file in File Explorer > Properties.
    • Under the General tab, check Unblock (bottom of the dialog).
    • Click Apply, then OK.
    • Reopen the file in Excel and click Enable Content if prompted.

    Add a Trusted Location

    If the file is on a network share or specific folder, add that folder as a trusted location:

    • Open Excel > File > Options > Trust Center > Trust Center Settings.
    • Select Trusted Locations > Add new location.
    • Browse to the folder containing your .xlsm file and check Subfolders are also trusted.
    • Click OK twice to save.

    Contact support:

    If Macros are still blocked, it may be due to your organization’s security policy. Many companies disable Macros by default because they can contain scripts that pose security risks, such as malware or unauthorized actions. 

    Please contact your IT department to adjust the settings or grant access for this trusted file. 

    Alternatively, you can request a version of the file that does not use Macros. 

    I hope information above helpful, if you have any other questions, please feel free to reach out.


    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.


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.