Sharing macro-enabled Microsoft Office files

Macro-enabled files (such as .docm and .xlsm) can contain automated code that helps perform tasks, but they can also pose security risks. To help keep University systems and data safe, restrictions apply to the sharing of these file types. This guidance explains what these files are, the controls in place, and the recommended alternatives for sharing them.

What are Macro-Enabled Files and Why Are They Restricted?

Some Microsoft Office files can contain macros, which are small programs used to automate tasks. Examples include Word .docm, Excel .xlsm and PowerPoint .pptm files.

Macros can provide useful functionality, but they can also be used to distribute malicious software. Microsoft therefore applies additional security controls to macro-enabled files, and some files may be blocked when sent as email attachments. Macros from the internet are blocked by default in Office. Click on the link below to read more. 
Macros from the internet are blocked by default in Office.

  • Check whether the macro is actually required. If the recipient only needs to read or edit the information, save and share a standard .docx, .xlsx or .pptx version instead. Microsoft advises that macros are not normally required simply to view or edit Office files. Enable or disable macros in Microsoft 365 files [Enable or...365 files]
     
  • Do not rename the file extension, place it inside another file, or use another sharing method simply to circumvent an email security block.
     
  • Where there is a legitimate need to collaborate on a macro-enabled file, OneDrive or SharePoint may be used in accordance with University sharing and access-control requirements. However, this does not mean that the file or its macros are automatically safe.
  • Files held in SharePoint and OneDrive are subject to Microsoft 365 malware protection. A file identified as malicious may be blocked from being opened or shared. What to do when a malicious file is found in SharePoint Online, OneDrive, or Microsoft Teams [What to do...soft Teams]
     
  • Do not enable macros just because you recognise the person who shared the file. Only enable macros where you were expecting the file, understand why the macro is required and are satisfied that the file and its source can be trusted. Microsoft warns that phishing attacks can appear to originate from people or organisations that you recognise. A potentially dangerous macro has been blocked [A potentia...en blocked]
     
  • If Microsoft Defender or Microsoft 365 identifies the file as malicious or blocks access to it, do not attempt to bypass the protection. Seek advice from the appropriate University IT support or security team.

Important: Storing or sharing a .docm, .xlsm or .pptm file through OneDrive or SharePoint does not remove the security risk associated with macros. Microsoft identifies VBA macros as a commonly exploited mechanism for delivering malware and ransomware. Harden VBA macro security in Microsoft 365 apps