C#Outlook插件-检测定期会议何时被删除

C#Outlook插件-检测定期会议何时被删除,c#,plugins,outlook,C#,Plugins,Outlook,我需要我的插件来检测定期会议何时被删除。我的问题是,如果我只删除集合中的一个事件或删除整个集合,BeforeDelete事件将以相同的方式触发。我需要知道用户何时删除整个集合,而不仅仅是其中的单个事件。项目中是否有引用此项的变量 public void MailItem_BeforeDelete(object Item, ref bool Cancel) { Outlook.AppointmentItem MailItem = Item as Outlook.AppointmentI

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

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. 
}

使用
RecurrenceState
属性

从文档中,此属性设置为
OlRecurrenceState
枚举:

  • olApptMaster:1-此约会是主约会
  • olApptOccurrence:2-约会是由主约会定义的定期约会的事件
以下是文档的几个链接:


太好了!。。非常感谢。