There will always be occasions where you will have the need to open a Word or Excel document in the desktop application instead of opening it within the web browser. This could be for example due to the document not displaying correctly within the browser, so how can we accomplish this?

It’s actually quite simple really!

Prefix any URL with the either ms-excel:ofv|u| for Excel documents or ms-word:ofe|u| for Word documents.

For example, the following URL could be used to force a word document to open in the desktop app:

ms-word:ofe|u|https://mysite.sharepoint.com/documents/mydocument.docx

This will automatically open the app in Internet Explorer, however in other browsers like Chrome a message will appear asking the user to confirm they want to open the link using the app: