Thursday, October 27, 2016

Making a Link to a Document in SharePoint 2013 Open in client program

When we go to a Document Library list view, we can open the document in client program directly if:

1. In the library settings, the default open behavior is "open in the client application"

2. In Central Admin -> Manage web application -> General Settings -> Browser File Handling -> Permissive

However, if we want to add the document link to a page, then user may get prompt message from IE as below, when clicking that link:

That means the document will be downloaded to local hard drive first, then be opened from there.

What if we want to open the document in the SharePoint library directly?

If "Office Web Apps" ("Office Online Server") is available, we can follow this link to open the document in web browser. Or else, we need the help of JavaScript. Insert a Content Editor Web Part to that page, then add the script below to it.  Done!

" rel="sp_DialogLinkNavigate">Document Link Label

No comments:

Post a Comment