Launch MS Word on Client PC to Edit Document on Server

痞子三分冷 提交于 2019-12-25 05:19:23

问题


I have a web application(PHP) running on a server which hosts several DOCX Documents (MS Word documents)

I want the user (using my application) after choosing any document to be able to:

  • open the document using Microsoft Word installed on his PC
  • View the document and edit it.
  • save his work, and changes must be committed to the server.

could anyone help me how to do that

ie.

  • lunch MS Word on client PC from JavaScript
  • know when the user closes the MS Word application on his PC
  • is it necessary to download the file before editing it or I can edit it remotely?

Thanks in advance


回答1:


You can launch Office applications using Office URI Schemes. This would allow you to automatically open the file.

If you want to avoid downloading the file locally, you'll need to implement either WOPI or WebDav on your backend to handle the requests.

A simpler solution would be to use Microsoft Graph to push the file into OneDrive. Files in OneDrive have a WebUrl property which wires up opening documents in Office for you.



来源:https://stackoverflow.com/questions/43557763/launch-ms-word-on-client-pc-to-edit-document-on-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!