【问题标题】:Outlook calendar conditional formatting based on customProp/itemClass基于 customProp/itemClass 的 Outlook 日历条件格式
【发布时间】:2017-03-10 16:30:01
【问题描述】:

我没有找到一种方法来根据 customProperties 或自定义 itemClass 将条件颜色格式应用于 Outlook 日历中的约会。

这是我设法做到的:

  • 当我转到 Outlook 2016 条件格式并选择高级选项卡时,我可以选择 Class 字段并将条件设置为包含 IPM.Appointment。应用此条件格式时显然有效,因为所有条目的类型均为 IPM.Appointment :)
    OfficeJS 文档中说:“您可以创建扩展默认消息类的自定义消息类,例如,自定义约会消息类 IPM.Appointment.Contoso。 " 由于Office.context.mailbox.item.itemClass 属性似乎是只读的,我在哪里可以为我的约会设置这样的课程?

  • 使用loadCustomPropertiesAsync 函数,我可以加载和保存当前项目的自定义属性。这个选项对于我想做的事情来说似乎很酷,但我没有找到通过任何 Outlook 2016 条件格式字段访问它的方法,有什么想法吗?

这是我想到的两件事,也许你有一个更简单的方法来做到这一点?

【问题讨论】:

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


    【解决方案1】:

    itemClass 属性是只读的。文档只是指出通常可以创建不同的约会类型,但不能通过 JS API。

    我也找不到使用自定义属性配置条件格式字段的方法。我能想到的另一种解决方法是尝试插入条件格式字段可以查找的隐藏文本。例如,您可以使用:

    Office.context.mailbox.item.body.prependAsync(
        '<div style="display:none">some-text-to-look-for-in-view-settings</div>',
        {coercionType:Office.CoercionType.Html},
        function (asyncResult) {
            if (asyncResult.status == "failed") {
               // any error handling
            }
        });
    

    【讨论】:

    • 感谢您的回答。我也在考虑这种解决方法,但我对此并不满意。
    猜你喜欢
    • 2021-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-13
    • 1970-01-01
    • 2018-03-02
    • 1970-01-01
    • 2023-03-12
    相关资源
    最近更新 更多