Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

JS Code to Open Word Doc in Desktop App Without "Save As" in Chrome

$
0
0

I have been trying to trace and grab the code in JavaScript files (core.js, init.js) loaded into the Chrome browser which opens up a Word file from the document library ellipsis menu without opening the Save As dialog window. I have a web application in plain HTML (non-ASPX) with links to files in the doc lib, but I am seeing a Save As dialog window opening (whether in Chrome or IE, IE is still official browser in the enterprise), which when canceled then opens the Word app in a state also requesting user check out.

Has anyone found the script that will do what SharePoint core.js/init.js files will do?

Note that I can easily open these documents in-browser (Word Online).

The ellipsis menu interface appears to use deprecated HTML elements (<menu>) and nonstandard span element attributes such as "onmenuclick" (which Chrome still appears to read) with a value showing the code below, which I have adapted partially.

<span type="option" text="Open in Word" onmenuclick="_WriteDocEngagement('DocLibECB_Click_ID_EditIn_Word', 
     'OneDrive_DocLibECB_Click_ID_EditIn_Word');
    editDocumentWithProgID2('\u002f16 Contract FIASO Correspondence Master Log Docume\u002fSC16-19-00000-XX 19196 modify report - Rev Resp - ASO.docx',
 '', 'SharePoint.OpenDocuments', '1', 'https://server', '0', 'ms-word')" 
    iconsrc="/_layouts/15/images/icdocx.png" iconalttext="" sequence="110" 
  id="ID_EditIn_Word"></span>


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>