0

I'm trying open a file via a hyperlink on a page, but it's downloading the file rather than opening a server copy.

When I click the hyperlink i get the following. enter image description here But when i click the actual file in the document library I get this. Which is the way i would also want it for the link. enter image description here

I've already tried the following:

  1. Opening Documents in the Browser in Doc Library Advanced Settings
  2. Enabled Open Documents in Client Applications by Default under Site Collection Features
  3. Set Browser File Handling to Permissive in CA
  4. Set SuppressModernAuthForOfficeClients to true via Powershell
  5. Checked if Enable Client Integration? is set to Yes in CA

Why is it behaving this way? It did work just fine in SP2013, but we recently upgraded to 2019 and now it does that.

Any ideas?

NOTE: When I set Require Check Out to Yes within the document library setting it kind of works. It will open the file from the server and asks if I want to check it out. enter image description here

I do not prefer this approach, because I would probably have to set this for every document library in my farm whenever someone is trying to place a link. Additionally I don't want to force checkout, because people forget to check files back in.

Any help is greatly appriciated.

1 Answer 1

1

Try applying Office URI scheme in the hyperlink. Example:

ms-word:ofe|u|<URL to document>

You can add this link to a classic page by building a clickable link using Script Editor:

<a href=" ms-word:ofe|u|<URL to document>"> Hyperlink </a>

This method does not work for modern pages though. Reference: Office URI Schemes.

5
  • Hi, I've tested your suggestion and it may work, but a secondary issue was triggered. I'm now getting the following error. "this action couldn't be performed because office doesn't recognize the command it was given." after trying the above Plus, this only works in a script editor. SP removes the whole href, when I try the scheme on a a page. I'll have to further invesitgate this.
    – Jaitsujin
    Commented Dec 13, 2020 at 23:57
  • @Jaitsujin Yes you are right. The link cannot be used directly on SharePoint pages since it is not "valid" to SharePoint. Let me know if you have any progress. Commented Dec 15, 2020 at 2:29
  • I think at this point I will have to simple direct the user to the document library until MS fixes this.
    – Jaitsujin
    Commented Dec 16, 2020 at 5:42
  • @Jaitsujin ok. You can also give your feedback via SharePoint UserVoice sharepoint.uservoice.com if needed. Commented Dec 17, 2020 at 1:24
  • Thanks. I'll do that.
    – Jaitsujin
    Commented Jan 6, 2021 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.