Open document in JavaScript edit mode

I am running the following JavaScript to open an existing document in edit mode:

   url = 'https://sp.abc.com/sites/apps/Shared%20Documents/test.docx';
   baseUrl = 'https://sp.abc.com/sites/apps/';
   editDocumentWithProgID2(
         url, 
         '', 
         'SharePoint.OpenDocuments', 
         '0', 
         baseUrl, 
         '0'
   );

      

The following error message appears:

    "We're sorry, we couldn't find a program to open this document"

      

I can happily open the file in edit mode using the "EDIT" link of the context menu.

Any idea why I am getting this error message? (BTW: SP 2013 launch, MDS activated).

+3


source to share


1 answer


Do you mean opening the document itself in edit mode, or opening document properties in edit mode?

If you want to open the properties in edit mode, just pass the document item id in the query string like below: javascript



http: //site/Shared%20Documents/Forms/EditForm.aspx? ID = 1

0


source







All Articles