Open Related Document in Client Application
Good Afternoon,
We have a related item view on a display form that displays word documents. We need these word documents to open in the client application as opposed to Word Online. From the Document Library itself they open in the Client Application, but this doesn't seem to pass through to the related item view.
We don't want to download a copy of the file so simply having a HTML Link won't work as the document needs to save back to the SharePoint list...
How can we implement the above please??
Thanks
We have a related item view on a display form that displays word documents. We need these word documents to open in the client application as opposed to Word Online. From the Document Library itself they open in the Client Application, but this doesn't seem to pass through to the related item view.
We don't want to download a copy of the file so simply having a HTML Link won't work as the document needs to save back to the SharePoint list...
How can we implement the above please??
Thanks
Hi!
Related documents provide the same behavior in part of opening web apps or client apps as regular list views. That behavior can be configured for the whole site collection, not a certain form or related items control.
Please, check this Microsoft Community forum topic: https://answers.microsoft.com/en-us/mso ... a1b?auth=1
Related documents provide the same behavior in part of opening web apps or client apps as regular list views. That behavior can be configured for the whole site collection, not a certain form or related items control.
Please, check this Microsoft Community forum topic: https://answers.microsoft.com/en-us/mso ... a1b?auth=1
Hi Alex,
Unfortunately this does not seem to be the case, our Site collection is set to open documents in the client app, however this functionality only seems to work in I.E and not in Chrome, and due to other restrictions in I.E our users all use Chrome. I do have an open case with Microsoft and they are looking into this, however in the meantime I need a fix for the issue...
What I am thinking is something along the lines of hijacking the link and adding "ms-word:ofe|u|" to the beginning of the URL string to force the document to open in the client app, I just need a little help with the right way of doing this if possible??
Thanks
Unfortunately this does not seem to be the case, our Site collection is set to open documents in the client app, however this functionality only seems to work in I.E and not in Chrome, and due to other restrictions in I.E our users all use Chrome. I do have an open case with Microsoft and they are looking into this, however in the meantime I need a fix for the issue...
What I am thinking is something along the lines of hijacking the link and adding "ms-word:ofe|u|" to the beginning of the URL string to force the document to open in the client app, I just need a little help with the right way of doing this if possible??
Thanks
Hi Alex,
I have resolved this issue with the following code: -
Not sure if you can see any issues with this but it seems to be working ok at the moment...
Thanks
I have resolved this issue with the following code: -
Code: Select all
$('.ms-vb2 a').click(function() {
var documentURL = $(this).attr('href');
documentURL = 'ms-word:ofe|u|'+documentURL;
window.location.href = documentURL;
});
Thanks
Hello andyb,
Please check how the related items control renders, depending on this you need to use a different element name in the code, as DOM may differ depending on the rendering mode.
If it renders on the client-side you need to use the below code.
If it renders on the server-side use $('.ms-vb a') in the code.
Note, that to make the code work you need to enable opening documents in client applications in Site collection features. Please see how to enable it in the instructions at Microsoft site.
Please check how the related items control renders, depending on this you need to use a different element name in the code, as DOM may differ depending on the rendering mode.
If it renders on the client-side you need to use the below code.
Code: Select all
$('.ms-listlink').click(function(){
var documentURL = $(this).attr('href');
documentURL = 'ms-word:ofv|u|'+documentURL;
window.location.href = documentURL;
});
Note, that to make the code work you need to enable opening documents in client applications in Site collection features. Please see how to enable it in the instructions at Microsoft site.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 17 guests