Macro unblocking

Craig McClain (C) 0 Reputation points
2026-08-28T19:16:48.0933333+00:00

Unblocking a macro enabled file downloaded from an email attachment.

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

Answer recommended by moderator
Craig McClain (C) 0 Reputation points
2026-08-31T17:44:57.5766667+00:00

the issue was security issues on my computer. The file had to be saved in a folder that was coded correctly to deal with this kind of issue. By saving the file into the correct directory, the file could then be delt with.

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Oldest
  1. AI answer

    2026-08-28T19:17:16.4366667+00:00

    For a macro-enabled file downloaded from an email attachment, the file usually has Mark of the Web, so Office blocks macros by default.

    Use one of these supported ways to allow macros to run for a file that is trusted:

    1. In File Explorer, right-click the file and select Properties.
    2. On the General tab, look for the Unblock checkbox in the Security section.
    3. Select Unblock, then choose Apply and OK.
    4. Reopen the file in Office.

    If the Unblock checkbox is not available, PowerShell can be used to remove the mark from the file with the Unblock-File cmdlet.

    Additional notes:

    • Email attachments are treated as files from the internet, so macros are blocked by default.
    • If the file is on a network share and the share is considered in the Internet zone, selecting Unblock might not work.
    • For groups of trusted files, a safer managed approach is to use a Trusted Location or a trusted site/intranet configuration.
    • If the file was previously opened before this behavior change and Enable content was selected, it can remain a Trusted Document.

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

    Was this answer helpful?

  2. Jay1 Tran 605 Reputation points Independent Advisor
    2026-08-28T19:28:00.1666667+00:00

    Hi Craig,

    Thank you for reaching out.

    To unblock macro in an excel file, please follow these steps:

    1- Remove the Mark of the Web (MOTW)  

    • Open File Explorer, navigate to your Excel file that you need to enable macros 
    • Right click on it and choose Properties 
    • In General tab, check the Unblock box for the Security option. 

    User's image

    • If the Unblock options is not available, it's usually because that your file is currently saved in a OneDrive or SharePoint folder and it will be considered as from the internet.
    • You can try disconnecting OneDrive/SharePoint temporarily or move the file to your local folder and try the Unblock Security box again.

    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 pane > 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 

    3- Enable macros in Excel 

    • Open the Excel file that needs macro enabling.
    • If you see a yellow warning bar at the top with the message "SECURITY WARNING: Macros have been disabled", click Enable Content to enable macro for the file 

    You can also adjust the trust center settings for macros by:

    • Go to File > Options > Trust Center > Trust Center Settings 
    • Click Macro Settings and choose between "Disable VBA macros with notification" (which will show a yellow warning bar as I mentioned above) and "Enable VBA macros" (only if you're sure the file is safe) 
    • Then click OK to save the settings 

    I hope this information helps resolve the issue soon. If you have any further questions or updates, please don’t hesitate to share. I’m always happy to assist further if needed.   

    Thank you for your time and cooperation.

    Was this answer helpful?

    1 person found 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.