SOLVED

Open in client application when sharing link

Copper Contributor

I know it is possible to set files to open in client applications when opening up a file from a SharePoint library, but is it possible to set that as default behavior when opening a file from a shared link?  I have set the site collection default to open in client application and library setting to open in client application but when I send a co worker a shareable link out of sharepoint it will only open in the web version.

35 Replies

To clarify, the steps are

  • File
  • Info
  • Copy Path

etc.

@AaBlu I have copied the "Direct Link" and although i shared it to ANONYMOUS its still giving "Access Denied" message.

 

i want to host a PDF file and provide link to public anonymously 

Love the suggestion of the modifier and then using Tiny URL!  Tried it and it worked!!! 🙂

@DMcE2490 Hi could you please explain how you use it? Thanks.

Get the full filename/path and then add "ms-word:ofe|u|" in front of it. Put that into tiny URL or something similar to get a normally formatted URL. You can then use that as your link within SharePoint.
See explanation from Chris9065 below. This can also be used by replacing 'word' with 'excel' or 'powerpoint'. If you replace 'ofe' with 'ofv' the person using the link can only view the document, not edit it. Full explanation here - https://docs.microsoft.com/en-us/office/client-developer/office-uri-schemes
You can just change link at the end. Change web=1 to web=0

Problem solved 😊
That was what I suggested in this thread back in 2018 - however, since then links are auto-converted to not show the path by default but to be more human friendly to read, making this workaround a little more cumbersome. On the other hand, at least on our tenant the links now open in desktop apps even if the url ends with web=1 (so in our case the problem is really solved)

Yeah I was looking cause I just encountered this issue. However when I delete web=1 entirely it didn't work for me. But it inspired me 😉

I copy link from SharePoint and paste it with Shift + Ctrl + V (this makes it paste normal link) and change web=1 to 0 and it works.

 

Our SharePoint unfortunately still defaults to web app instead of desktop.

Interesting - for us Shift+Ctrl+V doesn't paste anything (usually used for pasting formatting though)

Alt+Ctrl+V on the other hand would give me the option to chose between unformatted and formatted text.

I don't know if it has anything to do with this particular situation but on our SharePoint I changed default behavior to open in desktop apps in the SharePoint settings but initially that only had effect on the actual Libraries (not on webparts, search results or pasted links)
@Chris9065 - Did you create this solution in Micrograph or did you use custom code ( React, JS or Angular ) Thanks!
I only needed to create these links for a couple of specific documents so it was just done manually.
Hey Sir, Thanks for the clarification. If you had to generate this solution via code, what direction would you go? ( Microsoft Graph or Custom Code ). Thanks again!
@Erik Wettergren, that causes a forced download on my Web Browser, which is not bad. I suppose the only way to share in a way that others can view locally and not web-based is a download. The formating in the web-based view is so poor.

@natanz I found the same thing. When deleting the ?web=1 part, Chrome responds with "Save as....", whereas Edge asks if I want to open in Excel (read-only), but with the option to read/write.

 

Annoying to have to switch to Edge for this. It worked differently in Chrome a few months ago.

Yeah, I was responding to the question about shared links where the ms-word:ofe|u| prefix works