Call Us At: 701.866.2098

Force Files to Open with Microsoft Apps When Sharing Links Using URI Schemes


URI schemes allow for office productivity applications to be invoked with various commands. Each application is given a different named scheme but all schemes follow the same rules for how the URI is formed (URI Schema).

Full schema

< scheme-name >:< command-name >”|”< command-argument-descriptor > “|”< command-argument >

The scheme syntax includes the following:

1. < scheme-name >: This refers to the type of application that should be invoked. For instance, the ms-word: scheme name is registered by Microsoft Word.

2. “:” separator

3. < command-name >: This describes the actions that the application should perform. For instance, opening a document for viewing. The list of command names is described in section 1.5.

4. “|” (vertical bar) separator

5. < command-argument-descriptor >: This element gives more information about what the command argument is about.

6. “|” (vertical bar) separator

7. < command-argument >: The arguments vary depending on the command. One common argument is the URI to a document, typically using the http or https scheme. Note that within < command-argument > segments the RFC 3986 reserved characters “:” and “/” are part of the argument data, not delimiters, and are therefore included unescaped.

Abbreviated schema

An abbreviated form of the office URI schemes allows for a more compact request to launch a specified Office application to open the resource located at a given URI. This abbreviated form implies the < command-name > “ofv” and the < command-argument-descriptor > “u”. No further commands or command arguments are allowed in this schema.

< scheme-name >:< command-argument >

1. < scheme-name >: the type of application that should be invoked. For instance ms-word: for Microsoft Word.

2. < command-argument >: URI for the resource the application should open. Currently only URIs based on the http or https scheme are supported.

Examples of Use

Microsoft Excel File
Sharepoint’s default shared link is:

https://sharepoint.com/shared/YOUR_EXCEL_DOCUMENT.xlsx?Web=1

change to:

ms-excel:ofe|u|https://sharepoint.com/shared/YOUR_EXCEL_DOCUMENT.xlsx

Microsoft Word File
Sharepoint’s default shared link is:

https://sharepoint.com/shared/YOUR_WORD_DOCUMENT.docx

Change to:

ms-word:ofe|u|https://sharepoint.com/shared/YOUR_WORD_DOCUMENT.docx

Leave a comment

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