A common measure in corporate environments is to block macros files downloaded from the internet, which is implemented as a security measure to prevent users from inadvertently executing malicious.

How does it work?

In the context of Microsoft Office documents, files downloaded from the internet will include the Mark of the Web (MOTW), which can be seen on the file properties.

When Office is configured to block macro files downloaded from the internet and an office document is opened by a user that contains the Mark of the Web, Office will prevent macros within the document being executed.

Whilst it’s possible to manually remove the block within file properties, it may be required to prevent such blocking from occurring for websites trusted by an organisation, such as SharePoint Online.

Trusting SharePoint Online

If there is a website that should be trusted, the site can be added to the Trusted sites zone in Windows Internet Properties.

Windows Internet Security settings

In this example of SharePoint Online the Microsoft documentation directs you to add the following URLs to the Trusted Sites zone:

  • https://{your-domain-name}.sharepoint.com
  • https://{your-domain-name}-my.sharepoint.com

Adding those URLs will ensure files downloaded from your SharePoint Online or OneDrive sites from including the Mark of the Web, which means users should be able to run macros in documents downloaded from SharePoint Online.

The microsoft365.com edge case

An edge case to be aware of is that if you download files directly from the microsoft365.com Quick access feature and are using the Microsoft recommended URLs in the Trusted sites zone, the execution of Macros will be blocked as the file will include the Mark of the Web.

Thankfully the solution is as simple as adding https://www.microsoft365.com to the Trusted sites zone.

By Andrew

Leave a Reply

Your email address will not be published. Required fields are marked *