【问题标题】:Office JS API fails on Outlook 2016 on MacOffice JS API 在 Mac 上的 Outlook 2016 上失败
【发布时间】:2018-05-31 15:39:48
【问题描述】:

我正在开发一个 Outlook Web 加载项,我在其中为当前选定的约会项目打开一个任务窗格。

我正在使用此代码 sn-p 来读取约会项目的 itemId。

itemId = Office.context.mailbox.item.itemId;                    

                if (itemId === null || itemId == undefined) {
                    Office.context.mailbox.item.saveAsync(function (result) {
                        itemId = result.value;

此代码在 OWA、Outlook for Windows 中运行良好。但是,它无法在 Outlook for Mac 上读取 itemId。我将 itemId 设为“未定义”。

【问题讨论】:

    标签: javascript office-js outlook-web-addins


    【解决方案1】:

    这是 saveAsync() 和 documented here 的已知限制:

    注意:以下客户端在撰写模式下的约会上具有不同的 saveAsync 行为:

    • Mac Outlook 不支持在撰写模式下的会议上进行 saveAsync。在 Mac Outlook 中的会议上调用 saveAsync 将返回错误。
    • 当在撰写模式下对约会调用 saveAsync 时,Web 上的 Outlook 始终会发送邀请或更新。

    【讨论】:

    • 感谢您的澄清标记。我使用 saveAsync() 作为解决方法。但是,声明 Office.context.mailbox.item.itemId;在 Mac 上的 Outlook 上也返回 undefined。
    • 这被进一步记录:“itemId 属性在撰写模式下不可用”
    猜你喜欢
    • 2016-05-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-24
    • 2019-07-02
    • 1970-01-01
    相关资源
    最近更新 更多