Share via

Unblocking Macros in Excel

hein van rensburg 0 Reputation points
2026-02-24T14:02:08.56+00:00

How to unblock macros in Excel files from the corporate website. The initial steps make no difference

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.

Trusted sites also does not work.

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hendrix-C 12,115 Reputation points Microsoft External Staff Moderator
    2026-02-24T16:07:52.1733333+00:00

    Hi @hein van rensburg,

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

    According to your concern, please follow the steps below to unblock macro for the Excel file (note: you must do these steps in your personal device or the device having macro blocked):

    1/ Use the PowerShell command

    If the "Unlock" checkbox isn't available, you can use PowerShell to unlock your file's macro (if your device has permission to use PowerShell):

    • In the search bar, type PowerShell and select "Run as administrator."
    • Then, paste this script into PowerShell > Enter to unlock your file:
      Unblock-File -Path "C:\Path\YourFile.docx"
    

    2/ Add the file location as a trusted location  

    • Open Excel and go to File > Options > Trust Center > Trust Center Settings

    User's image

    • Select Trusted Locations in the left bane > Add new location > Browse and navigate to the folder where you keep the files need to enable macro 
    • Press OK to close all the dialog boxes then try opening your macro-enabled excel file again

    For references: Macros from the internet are blocked by default in Office - Microsoft 365 Apps | Microsoft Learn.

    If both cannot unblock the macro, you can delete the downloaded file and get the new one from your website (which has been designated as Trusted site) so you will have the file with macros working properly because adding the site to Trusted Sites can help future download be treated as safe, not for already downloaded file.

    Please understand that our initial response does not always resolve the issue immediately. However, you can try these steps and let me know if it works for you. If not, we can work together to investigate further.

    If you have any questions or need further assistance, please feel free to share them in the comments on this post so I can continue to support you.

    Thank you for your understanding and cooperation. I'm looking forward to your reply.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it.

    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.