Is there an Application URL Protocol for MS Word?

前端 未结 2 1967
甜味超标
甜味超标 2021-01-01 18:56

I\'m working on a javascript front end site to run in the browser [Chrome], and I\'d like to launch Word on the clients PC with their selected macros that have already been

相关标签:
2条回答
  • 2021-01-01 19:47

    Office 2010 SP2 and above install URI Schemes which you can use from your website. Microsoft has documentation for these available here: https://msdn.microsoft.com/en-us/library/office/dn906146.aspx

    There is a protocol for each of the office products. The MS Word protocol is ms-word:<command-name>"|"<command-argument-descriptor>"|"<command-argument>"

    You probably want the "open for edit" command which looks like this: ms-word:ofe|u|<document-uri>

    0 讨论(0)
  • 2021-01-01 19:54

    You could try to write your link as follows:

    ms-word:ofe|u|http://example.com/myTestDocument.docx
    

    Note that this will most likely require you to have a WEBDAV server running, that is capable of interpreting such requests.

    The details about what is the meaning of ofe or u can be found in here

    This protocol is available starting Microsoft Office 2010 Service Pack 2 (yes, there are service packs for office also).

    0 讨论(0)
提交回复
热议问题