Search code examples
office-jsword-addins

Word Add-Ins Office.js


we do have the requirement that we have to write data in a .docx document, but we do have to do it in a batch process, not in a dialog, and would like to save the docx document.

In our case the user is working in our own WebApp and should be able to start the process of the Word-AddIn, which we created and he got over sideloading before. One more question. The user would launch the Word Addin on the same host, as our WebApp runs. The request for data would also go to the same host. Do we really need for this scenario https or should http work either?

Is this possible? And if yes, how this process would be look like?

Thanks a lot!


Solution

  • My understanding of the problem might be a bit limited - but:

    • It doesn't matter which server the add-in is running, you'll need https. This just ensures that the data you transmit in either way is encrypted.
    • You can definitely make sure your server and your add-in are having a conversation using WebSockets. (ex: Tell from the server that you want to save the document, or append something, publish that event and on the client side after receiving this just do what you needed to do)
    • As another bonus, you can actually pin the add-in now, so you don't need to spend additional effort to keep it open:

      <Action xsi:type="ShowTaskpane">
         <SourceLocation resid="readTaskPaneUrl" />
         <SupportsPinning>true</SupportsPinning>
       </Action>