'word add-in using OfficeJs

We already developed Excel add-in using officejs with RESTful api with Batching in custom Functions. And we wanted to achieve same in Word add-in hence kindly share example using word add-in with RESTful api.



Solution 1:[1]

As I understand it, you have a web API (REST architecture) and you have successfully made calls to it from an Excel custom function. Now you want to make calls to a web API from a task pane Word add-in. You should be able to do this exactly the same way that you do in the custom function. In fact, to start with, you should use the exact calling code and get the exact same data. The difference is only in the UI. You will probably want the calling code triggered by an event handler for a button in the task pane.

Solution 2:[2]

As per my knowledge, you need word manifest.xml file then all your business logic you can write using differences your addin by running inside excel or word

So officejs provide Host info to check running platform

I guess it will help

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rick Kirkham
Solution 2