Site icon

Communication between Office Web Add-ins

Sometimes you have multiple add-ins and you need to facilitate communication between them. For example, a common scenario I have heard is that you have:

You need to be able to facilitate communication between the two so that when updates happen to one add-in, the other receives those updates. I recently worked on a proof of concept that helped prove how this can be done.

The solution is to use the Document as a communication medium. In the particular case we used CustomXMLParts in the document. Here is how it would work:

Here is the code for the Content Add-in to look for the message from the TaskPane:

Next, here is the code in the Task Pane Add-in that will send the message for the content add-in to read:

Exit mobile version