[Javascript Powerpoint API] How to get currently visible slide of slide show (in read mode)

Lukas Liss 6 Reputation points
2021-04-07T10:20:22.167+00:00

I am using the Office javascript API to create an Add-In. In the edit mode, I am able to set a handler that gets called whenever the selection of a slide changes.

Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, myHandlerFunction)

But this does not work when the user starts the presentation in the slide show mode because then the selection does not change but the shown slide does. I would like the add a handler to be called whenever the shown slide changes. Then I would like to get the id of the currently visible slide in the slide show (read) mode.
Is there a way to add such a handler or at least to access which slide is currently shown in the slide show (read) mode?

Thank you very much
Lukas

(PS: I am very new to this forum so I hope I posted the question to the correct forum. If not please feel free to move it to the correct one.)

Microsoft 365 and Office Development Office JavaScript API
Microsoft 365 and Office Development Other
0 comments No comments
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.