In our web application, we have direct link to word document in SharePoint site. So when user clicks on the hyperlink, I would like to open that in users local desktop word application. But I am unable to achieve it. I have tried other work arounds like, when user clicks on the document in the sharepoint site, able to open in word desktop app. But it is still two clicks for user to reach the word desktop app.
Is there any way if we pass any parameters in the url saying open in local desktop app?
Thanks
2 Answers
Below is the code to open the desktop app directly in users machine. It will ask for confirmation though before opening the document in local.
ms-word:ofe|u|
1If Word files are stored on one document library, you may go to library settings > advanced settings > Default open behavior for browser-enabled documents, choose **Open in the client application**, this set is only for one library.
If you want to set this feature for all Word files on a SharePoint site, I suggest you go to site settings > site collection features > active "Open Documents in Client Applications by Defualt".
1