I need to Open/Download Word or PowerPoint Document directly from Provider Hosted SharePoint App. We can perform easily in on-premise using editDocumentWithProgID2
Tried with getting CORE.js and SP.js and other related js files from 15 hive and placed in solution with referencing inside the aspx page.
<script src=”../Scripts/js/SP.Init.js”></script>
<script src=”../Scripts/js/SP.Core.js”></script>
<script src=”../Scripts/js/SP.Runtime.js”></script>
<script src=”../Scripts/js/SP.js”></script>
<script src=”../Scripts/js/CORE.JS”></script>
This function is called on anchor tag in javascript.
function EditDocumentFile(filename) { javascript: editDocumentWithProgID2(filename, '', 'SharePoint.OpenDocuments', '0', '/', '0'); }
Not working and shows error:
Uncaught ReferenceError: unescapeProperly is not defined
in browser developer tool console.
Any idea how to work with editDocumentWithProgID2 in CSOM [Office365 Provider Hosted App] ?