logo
search
VBA & Macro Problems

How to Use Excel and PowerPoint Macros in SharePoint Online

Partner EditorPartner Editor Oct 8, 2026 868 views

Question details

Users need to know how to effectively store, synchronize, and execute macro-enabled Excel and PowerPoint files using SharePoint Online without encountering security blocks or synchronization issues.

How to Use Excel and PowerPoint Macros in SharePoint Online
Product
Microsoft Excel and PowerPoint
Device & OS
not provided
Scenario
Collaborating on and executing macro-enabled files stored in SharePoint Online.
Observed behavior
Users experience issues running macros from SharePoint document libraries, handle linked macro files with slow OneDrive synchronization, and struggle with appropriate Trust Center configurations.
Before you start

Ensure you have the desktop versions of Microsoft Excel or PowerPoint installed, as VBA macros cannot be executed in the web versions of these applications. You must also have permissions to modify your local Trust Center settings.

Solution 1Recommended

Open Macro-Enabled Files in the Desktop Application

Since web applications do not support macros, you must open your SharePoint files directly in the desktop versions of Excel or PowerPoint.

SharePoint Online allows you to store macro-enabled files (.xlsm, .pptm), but attempting to run them in the browser will fail. Opening them in the desktop app ensures full macro functionality while keeping the file synchronized with SharePoint.

1
Navigate to the SharePoint Library

Open your web browser and navigate to the SharePoint Online document library where your macro-enabled files are stored.

2
Select the File

Click the three dots (ellipsis) next to your target .xlsm or .pptm file to open the context menu.

3
Open in Desktop App

Select 'Open' and then choose 'Open in Desktop App'. The file will launch in your local Excel or PowerPoint application where macros can be executed.

Open Macro-Enabled Files in the Desktop Application
Co-authoring Limitations: While co-authoring is supported, having several users edit a macro-enabled file at the same time can cause slow synchronization. It is recommended to limit concurrent editing on complex macro files.
Free Microsoft Office alternative

A Lightweight Alternative for Macro-Enabled Files

If configuring complex Trust Center settings and managing SharePoint sync issues is slowing down your workflow, consider WPS Office. It is a highly compatible, free, and lightweight alternative to Microsoft Office that easily handles your macro-enabled documents locally or via your preferred cloud storage.

  1. 1. Download and Install: Visit the official WPS Office website to download and install the free, lightweight suite.
  2. 2. Open Your Files: Launch WPS Office and easily open your existing .xlsm or .pptm files.
  3. 3. Edit and Save: Edit your documents with a familiar interface and save them in their original Microsoft formats.
Free to use with a lightweight installation package.Excellent format compatibility for Microsoft Office files (.xlsm, .pptm).Familiar user interface ensuring seamless migration with no learning curve.Built-in support for advanced spreadsheet and presentation editing.
QA img-9

Frequently Asked Questions

Can I run macros in Excel Online or PowerPoint Online?

No, macros and VBA code cannot be executed in the web versions of Excel or PowerPoint. You must open the macro-enabled file in the desktop application to run them.

Why are my SharePoint macros being blocked by default?

Microsoft Office blocks macros originating from internet locations, including SharePoint, as a security precaution. You need to add the SharePoint site to your Trusted Locations in the Trust Center to run them safely.

How do I handle slow synchronization with macro files?

Slow synchronization often occurs when multiple users attempt to co-author a complex macro-enabled file simultaneously. Limit concurrent editing and ensure that any linked files are stored locally via the OneDrive desktop sync app.

Is it safe to select 'Enable all macros' in the Trust Center?

No, it is highly discouraged. Selecting 'Enable all macros' allows any macro, including potentially malicious ones, to run automatically without warning. The recommended setting is 'Disable all macros with notification'.