[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.)

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
876 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,516 questions
0 comments No comments
{count} vote