logo
search
SharePoint Document Issues

How to Add an ms-word URI Scheme Link to a SharePoint Site

Olivia MillerOlivia Miller Oct 14, 2026 868 views

Question details

The user wants to create a button link on a modern SharePoint page that uses the ms-word URI scheme to open a Word document directly.

How to Add an ms-word URI Scheme Link to a SharePoint Site
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Attempting to bypass default SharePoint link restrictions to force a Word document to open in the local desktop application rather than the browser.
Observed behavior
Modern SharePoint rejects the button link because it generally requires standard HTTP or HTTPS URLs and blocks custom URI schemes like ms-word:.
Before you start

Verify that you have site owner or admin permissions to add custom web parts to your SharePoint page, as the default Quick Links web part will reject non-HTTP/HTTPS URLs.

Solution 1Recommended

Use a Modern Script Editor Web Part

Since standard SharePoint links block the ms-word URI, deploying a Modern Script Editor web part allows you to inject raw HTML to create the button.

This workaround relies on custom scripting, which must be enabled in your SharePoint tenant settings.

1
Add a Modern Script Editor Web Part

Edit your SharePoint page, click the '+' icon to add a new web part, and select the Modern Script Editor (you may need to deploy it via the SharePoint App Catalog if it is not natively available).

2
Insert the HTML Anchor Code

Click 'Edit snippet' and paste your custom HTML code. Use the format: <a href="ms-word:ofe|u|https://your-tenant.sharepoint.com/sites/library/file.docx"><button type="submit">Open File</button></a>.

3
Save and Republish

Click 'Save' on the snippet editor, then click the 'Republish' button at the top right of your SharePoint page to apply the custom link.

Use a Modern Script Editor Web Part
Security and Compatibility Notice: Using custom HTML scripts to launch local applications can introduce browser-compatibility issues and security warnings. Ensure your organization's IT policies permit custom scripts.
Free Microsoft Office alternative

Edit Your SharePoint Documents with WPS Office

If you are downloading Word, Excel, and PowerPoint files from SharePoint and need a fast, reliable desktop application to edit them, WPS Office provides excellent compatibility without the high subscription costs of Microsoft Office.

  1. 1. Download and Install: Get the free WPS Office installer from the official website and follow the setup wizard.
  2. 2. Open Downloaded Documents: Set WPS Office as your default application to automatically open DOCX files downloaded from your SharePoint sites.
  3. 3. Edit and Save Seamlessly: Make your changes using familiar tools, save in standard Office formats, and re-upload to your team's document library.
Highly compatible with Microsoft Office formats including DOCX, XLSX, and PPTXFree and lightweight alternative to resource-heavy desktop suitesFamiliar ribbon user interface ensures a zero-learning-curve migrationAll-in-one suite with a built-in PDF editor and powerful document management tools
microsoft office alternative - wps office

Frequently Asked Questions

Why does modern SharePoint reject the ms-word URI scheme?

Modern SharePoint link web parts are built with strict security validations that typically only accept standard web protocols like HTTP, HTTPS, and mailto. Custom client application URIs like ms-word: are filtered out to prevent malicious scripts from executing local apps.

Do ms-word URI links work smoothly in all web browsers?

Not inherently. Even if you successfully add the link via a script editor, modern browsers (like Chrome or Edge) will usually prompt the user with a security popup asking for permission to open an external application (Microsoft Word) before executing the link.

Can I use similar URI schemes for Excel and PowerPoint on SharePoint?

Yes, if you use the Modern Script Editor workaround, you can replace 'ms-word:' with 'ms-excel:' or 'ms-powerpoint:' in your custom HTML anchor tag to directly launch those respective desktop applications from the web page.