How to register for an event on initialisation of the PowerPoint API for web?

Viewed 22

Office.initialize() method never get called when enter or exit presentation mode for PowerPoint web add-in as explained by Microsoft here:

In PowerPoint on the web, the Document.ActiveViewChanged event will never fire as Slide Show mode is treated as a new session. In this case, the add-in must fetch the active view on load, as shown in the following code sample.

https://github.com/OfficeDev/office-js-docs-pr/blob/main/docs/powerpoint/powerpoint-add-ins.md#detect-the-presentations-active-view-and-handle-the-activeviewchanged-event

This Office.initialize() method will be automatically called when enter or exit presentation mode, so it can achieve the same goal as register an event.

We have posted an issue about this in the answers in the thread found here: https://github.com/OfficeDev/office-js/issues/2756 There you can also find an example for the web add-in and the Office.initialize() method.

Has anyone encountered the same problem or found a solution to this?

0 Answers
Related