1

I am developing an Add-In that needs to do a function when I delete / cancel a meeting.

I used the code:

Application app = Globals.ThisAddIn.Application;
Folder calendarFolder = app.GetNamespace("MAPI").GetDefaultFolder(OlDefaultFolders.olFolderCalendar) as Folder;
 _calcitems.ItemRemove += CalcitemsItemRemove;

The event CalcItemsRemove is called every time something is removed from the CalenderFolder.

Strangely this event is called even if the meeting item got accepted.

My question is how to identify

-> If an appointment is deleted from the calender Item. -> If an appointment is cancelled

4

1 回答 1

0

当您收到会议约会时,Outlook 会自动在日历中创建一个暂定约会。当您在收件箱中明确接受邀请时,Outlook 会删除暂定约会并创建一个全新的项目。这样做是为了解决当用户在一台机器上接受会议,然后从连接到同一个 Exchange 邮箱的另一台机器上删除邀请时出现的问题(我刚刚接受了,对吗?让我们摆脱邀请) - 如果邀请被删除, Outlook 删除用户刚刚从另一台计算机接受的约会。

重新创建约会时,将触发 Items.ItemAdd 事件。您可以将其视为全新的约会。

于 2015-04-05T18:30:17.413 回答