Office.context.officeTheme属性未定义

时间:2017-12-12 19:22:02

标签: outlook-addin office-js

在Outlook应用程序中使用时,属性Office.context.officeTheme未定义:Official documentation。在Word,Excel和PowerPoint中,属性已定义,我可以访问其子属性(bodyBackgroundColor,controlForegroundColor等...)。我尝试了最新的(1.1.0.13)和之前的(1.1.0.12)版本的Office.JS,但它不起作用。我的展望版本是:1711(Build 8730.2127),我也试过最新的内部人员构建。示例代码:

Office.initialize = function (reason) {
        $(document).ready(function () {

            // The "Office" object and its "context" property are valid but the "officeTheme" property is undefined.
            // This works in Word, Excel and PowerPoint but not in Outlook.
            if (!Office.context.officeTheme) {
                console.log("Office theme not loaded");
            }
        });
    }

1 个答案:

答案 0 :(得分:0)

根据从产品团队收到的信息,Outlook目前不支持office.context.officeTheme属性。感谢您通过文档指出此问题(以及记录相应的GitHub issue)。我们将更新文档以反映Outlook目前不支持此属性。