0
votes

I am working on a taskpane addin and a content addin for Powerpoint. I want to have the possibility to manipulate the content of the content addin through the taskpane addin, e.g. pushing a button in the taskpane addin to change an image or other web content in the content addin on the selected slide.

I can host both addins within the same React project, but I don't have the possibility to communicate between them in powerpoint to my knowledge.

2

2 Answers

0
votes

If the two add-ins are both hosted on the exact same domain, you could try using LocalStorage as a go-between. Your task pane stores a signal in a specific key of LocalStorage. Your content add-in must be setup to periodically check that key for changes and then respond accordingly. I haven't tried this, but it might work.

0
votes

This is a well-known and solved problem - you're looking for communication between windows or tabs.

Check out here: Communication between tabs or windows

In your apps, at the initialization part, you have to register the event listener for storage.

window.addEventListener('storage', () => {
  console.log('your local storage has changed');
});

and based on the received event payload, you can manipulate data.