【问题标题】:How to programmatically trigger presentation mode in JavaScript add-in for PowerPoint?如何以编程方式在 PowerPoint 的 JavaScript 加载项中触发演示模式?
【发布时间】:2015-09-28 17:01:17
【问题描述】:

我们有一种方法可以检查 PowerPoint 文档的当前状态:https://msdn.microsoft.com/EN-US/library/office/dn482495.aspx

Document.getActiveViewAsync

我也可以监听状态变化:https://msdn.microsoft.com/EN-US/library/office/dn482501.aspx

ActiveViewChanged 事件

而且我已经在使用如下:

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);

是否有 API 方法允许我触发演示模式?

由于某种原因,我在文档中找不到它。


为什么要触发演示模式?当用户按 F5 时,默认进入演示模式。但是,如果焦点位于加载项中,则会刷新加载项。我正在听 F5 键并阻止刷新,但我想进入演示模式以确保行为一致。

【问题讨论】:

    标签: javascript ms-office powerpoint office-js


    【解决方案1】:

    PowerPoint 中目前没有用于进入演示模式的 API。随时在Office Developer Platform's Uservoice 上请求此 API!

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-03
    • 1970-01-01
    • 2014-12-10
    • 2012-07-09
    • 2013-03-05
    • 2010-12-21
    • 1970-01-01
    相关资源
    最近更新 更多