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 setup in Word for them on their pc.
My questions is does Office [and Word] create an Application URL Protocol [MSDN how to article] for itself when installing it?
For example, iTunes does this, with the url 'itmss://itunes.apple.com/us/app/123213213?mt=8' which, if the user has installed iTunes, will prompt them to open it.
Is there a Word equivalent protocol to itmss? Can I pass the macro names to it as parameters?
If there not an equivalent protocol, does anyone know how I might achieve something similar?
A protocol is just a rule that says a particular kind of file (in this case, a template) should be opened by a particular app (such as Word or Word Mobile).
ms-excel:ofe|u|<argument> ms-powerpoint:ofe|u|<argument> The command ofe instructs the browser to open an Office document for editing. There is also a command ofv , meaning “open a document for viewing”, and it works in the same way. In either case, < argument> is a URI that references the Office document to be opened.
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).
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With