Why is an Excel workbook not added as a trusted document when it is stored in OneDrive folder?

SLax 20 Reputation points
2025-06-30T19:50:45.25+00:00

I have an Excel macro enabled file 'Workbook1.xlsm' stored in a folder in the 'OneDrive - Personal' location of my computer. When I access the file, I am presented with the security warning 'Macros have been disabled.'  When I select the 'Enable Content' button, the security warning goes away and I can use the macros in the workbook. But, the workbook does not get added as a trusted document. Consequently, when I close and reopen the workbook, I am once again presented with the 'Macros have been disabled' security warning. It appears that the issue has something to do with the workbook being stored in the 'OneDrive - Personal' location. If I move the same file to a folder in the 'This PC' location of my computer, and go through the same process of clicking the 'Enable Content' button, the workbook will get added as a trusted document. When I close and reopen the workbook in the 'This PC' location, macros are automatically enabled. I am no longer presented with the 'Macros have been disabled' security warning. How can I get macro enabled workbooks stored in the 'OneDrive - Personal' location to work the same way as those stored in the 'This PC' location?

Note: I have already reviewed the Q&A Assist answer to my question. The file stored in the 'OneDrive - Personal' location does not have the "Mark of the Web".

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

1 answer

Sort by: Most helpful
  1. Michelle-N 1,940 Reputation points Microsoft External Staff Moderator
    2025-07-01T03:23:59.5933333+00:00

    Hi @SLax

    Thank you for reaching out to the Microsoft Q&A Forum. 

    I understand that macro-enabled Excel files saved in your 'OneDrive - Personal' folder do not become trusted documents after you enable content, forcing you to re-enable macros every time you open them. However, the same files function as expected and are recognized as trusted documents when saved in a local folder on 'This PC'. As a forum moderator, my role is to help guide discussions and share information based on Microsoft documentation and community knowledge. From my research, Microsoft recently announced that macros from the internet are blocked by default in Office. Therefore, it is very likely that this is leading to the trouble you are having.  

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

    To get your OneDrive files to work the same way as your local files, you need to explicitly tell Excel that you trust your OneDrive folder. You can do this by adding your local OneDrive folder path to Excel's Trusted Locations. If you need to use files from OneDrive or SharePoint without macros being blocked, here are some possible options: 

    -Have them open the file by using the Open in Desktop App option 

    -Have them download the file to a and Add, remove, or change a trusted location in Microsoft Office - Microsoft Support

    User's image

     Trusted Locations for Office files - Microsoft 365 Apps | Microsoft Learn 

    To unblock macros in a file, like one from the internet or an email attachment, remove the Mark of the Web on your local device. To remove, right-click on the file, choose Properties, and then select the Unblock checkbox on the General tab. 

    User's image I hope this information can help you to solve your issue soon. If the issue persists, please feel free to send me more information 


    If you found this response helpful, please consider selecting "Accept Answer" and giving it an upvote. Should you have any further questions or require clarification, feel free to click "Comment" to continue the discussion.  

    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 Answers by the question author, which helps users to know the answer solved the author's problem.