【问题标题】:C# Outlook Plugin - Detect when recurring meeting is deletedC# Outlook 插件 - 检测定期会议何时被删除
【发布时间】:2017-10-12 02:30:46
【问题描述】:

我需要我的插件来检测定期会议何时被删除。我的问题是如果我只删除集合中的一个事件或删除整个集合,则 BeforeDelete 事件会以相同的方式触发。我需要知道用户何时删除整个集合,而不仅仅是其中的一次。 Item 中是否有引用此变量的变量?

public void MailItem_BeforeDelete(object Item, ref bool Cancel) {

     Outlook.AppointmentItem MailItem = Item as Outlook.AppointmentItem;

     //Somewhere in this little guy [MailItem] should be something telling me if the 
     //item that is being deleted is a single occurance or is the entire set that is being deleted?
     //MailItem.IsRecurring is true in both instances so thats doesnt work. 
}

【问题讨论】:

    标签: c# plugins outlook


    【解决方案1】:

    使用RecurrenceState 属性。

    根据文档,此属性设置为OlRecurrenceState 枚举:

    • olApptMaster: 1 - 约会是主约会。
    • olApptOccurrence:2 - 约会是由主约会定义的定期约会的发生。

    这里有几个文档链接:

    https://msdn.microsoft.com/VBA/Outlook-VBA/articles/appointmentitem-recurrencestate-property-outlook

    https://msdn.microsoft.com/VBA/Outlook-VBA/articles/olrecurrencestate-enumeration-outlook

    【讨论】:

    • 完美!.. 谢谢
    猜你喜欢
    • 1970-01-01
    • 2017-06-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多