2017-10-11 20 views
1

定期的な会議が削除されたときに検出するためにプラグインが必要です。私の問題は、BeforeDeleteイベントが、同じ方法で発生した場合、そのイベントの1つだけを削除したり、セット全体を削除したりすることです。私は、ユーザーがセット全体を削除しているのを知る必要があります。これを参照する変数がItemにありますか?C#Outlookプラグイン - 定期的な会議が削除されたときに検出する

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

答えて

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

+0

パーフェクト..あなたに感謝します – Troublesum

関連する問題