Reputation: 13213
We have a method to check current state of the PowerPoint document: https://msdn.microsoft.com/EN-US/library/office/dn482495.aspx
Document.getActiveViewAsync
I can also listen to changes of the state: https://msdn.microsoft.com/EN-US/library/office/dn482501.aspx
ActiveViewChanged event
And I'm already using is as follows:
var _hideArrowInPresentationMode = function(e) {
var presentationMode = (e.activeView === "read"); // can inline variable but I find 'presentationMode' more descriptive
if (presentationMode) {
$("#left").hide();
} else {
$("#left").show();
}
};
Office.context.document.addHandlerAsync(Office.EventType.ActiveViewChanged, _hideArrowInPresentationMode);
Is there an API method allowing me to trigger presentation mode?
For some reason I cannot find it in the docs.
Why do I want to trigger presentation mode? When user presses F5 it by default goes to presentation mode. However, if the focus is in the add-in, it refreshes the add-in. I'm listening for F5 key and preventing refresh but I'd like to go into presentation mode to ensure consistent behaviour.
Upvotes: 2
Views: 860
Reputation: 9806
There is currently no API in PowerPoint to enter presentation mode. Feel free to request this API on the Office Developer Platform's Uservoice!
Upvotes: 1