0

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.

Toph
  • 1

2 Answers2

0

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.

Rick Kirkham
  • 9,038
  • 1
  • 14
  • 32
0

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.

Mavi Domates
  • 4,262
  • 2
  • 26
  • 45