API or method to edit in MS Office

cancel
Showing results for 
Search instead for 
Did you mean: 
coisox
Active Member

API or method to edit in MS Office

Jump to solution

I stored my file.docx in Shared Files > myfolder. Clicking on the document give me URL:


ALFRESCO/share/page/context/shared/document-details?nodeRef=workspace://SpacesStore/80889ae1-3880-425a-a489-ee7639fc5d53

I found similar question Is it possible to implement edit on Microsoft word file that is available in Alfresco UI through res...  but I don't know how to get the URL.

Do I need to install additional stuff like AOS?

=============================================

Edited:

=============================================

To make my question clearer, I made an apps which can upload to Alfresco. I successfully made that. Then all uploaded document are listed in table with features to:

  1. Download (success)
  2. Delete (success)
  3. Edit in OnlyOffice (success)
  4. Edit in MS Office (stuck) <<< my problem is here

All these are possible because after successfully upload to Alfresco, I keep the nodeRef.

After digging into the source code give by Douglas C. R. Paes‌, here, I came up with this URL pattern but still no good:

ALFRESCO/share/proxy/alfresco/slingshot/doclib2/node/workspace/SpacesStore/80889ae1-3880-425a-a489-ee7639fc5d53

1 Solution

Accepted Solutions
douglascrp
Advanced II

Re: API or method to edit in MS Office

Jump to solution

I imagine what you are facing with is exactly what the following addon seems to solve

GitHub - magenta-aps/alfresco-edit-online-off-site: Alfresco module to allow use of the "Edit Online... 

View solution in original post

9 Replies
afaust
Master

Re: API or method to edit in MS Office

Jump to solution

Install AOS and you are able to edit an MS Office file using MS Office installed on the client.

coisox
Active Member

Re: API or method to edit in MS Office

Jump to solution

Thank you sir. But just want to confirm again. I don't need to open Alfresco document from MS Office (Click File > Open > browser Alfresco directory).

In Alfresco apps, when we hover on a document, this menu appear:

Clicking on it will open our MS Words and allow update. But inspect the menu won't give me the URL.

In the same screenshot I gave, inspecting the "Edit in ONLYOFFICE" give me URL. So the same URL pattern I can call from my web apps.

Now I need URL pattern to "Edit in Microsoft Office". I have the desired document nodeRef. I don't need to browse Alfresco directory.

afaust
Master

Re: API or method to edit in MS Office

Jump to solution

In the thread you have linked Martin Ehe already provided the pattern for the AOS link.

douglascrp
Advanced II

Re: API or method to edit in MS Office

Jump to solution

That is because the link is generated by a javascript function, that you can find here

share/actions.js at develop · Alfresco/share · GitHub 

The action configuration is available at share/share-documentlibrary-config.xml at develop · Alfresco/share · GitHub 

coisox
Active Member

Re: API or method to edit in MS Office

Jump to solution

His pattern (below) indicate that the document is stored in site. But I store in Shared Files and I don't know the Shared File path

ms-word:ofe|u|https://YOURSERVER/alfresco/aos/Sites/mysite/documentLibrary/mydoc.docx
coisox
Active Member

Re: API or method to edit in MS Office

Jump to solution

Thank you I'll study the code

douglascrp
Advanced II

Re: API or method to edit in MS Office

Jump to solution

I imagine what you are facing with is exactly what the following addon seems to solve

GitHub - magenta-aps/alfresco-edit-online-off-site: Alfresco module to allow use of the "Edit Online... 

coisox
Active Member

Re: API or method to edit in MS Office

Jump to solution

Yes, I believe so. After looking at it, it seems quite complicated for me with those jargon "his project requires both a Repository and Share AMP file to be installed to work".

But you link help me to understand my problem better. I'll try to move all my document to "site".

coisox
Active Member

Re: API or method to edit in MS Office

Jump to solution

Thank you Douglas C. R. Paes‌, finally my problem solve. I create a site for uploading document. Now the "Edit in Microsoft Office" menu has URL. I simply need to append the URL with "ms-wordSmiley Surprisedfe|u|"