user3762819
user3762819

Reputation: 115

Appointment EntryID after meeting response

I'm creating a plugin for Outlook using VSTO (C#) and I have a problem how to control EntryID of appointments. Every appointment has his unique EntryID and it's fine, I'm saving this ID and it helps me to sync Outlook's calendar with the one in my system. Problem is when someone sends update to meeting and I accept this - Outlook's item is updated but EntryID is different. I've read that during this process the old item is deleted and new one is created based on the previous one. Is there any event that will help me to catch old meeting, get his EntryID, then catch the new meeting, get his EntryID as well and it will allow me to update meeting EntryID in my system?

Upvotes: 1

Views: 488

Answers (1)

Dmitry Streblechenko
Dmitry Streblechenko

Reputation: 66276

You can try to use the Items.Item.Add/ItemRemove events, but I don't think it will be reliable, especially ItemRemove event does not pass any information about the deleted item.

You really need to avoid using the entry id as the identifier for appointments - use GlobalAppointmentId. It never change, and the same appointment will have the same value of GlobalAppointmentId even in different mailboxes. Keep in mind that Outlook deletes and recreates appointments when it processes meeting updates - that will change the entry id, but keep GlobalAppointmentId the same.

Unfortunately, the only problem is that OOM will not let you search for GlobalAppointmentId (or any other PT_BINARY property) in Items.Find/FindNext/Restrict. The only workaround is to either loop through all item in the Calendar folder (extremely inefficient) or search using Extended MAPI (C++ or Delphi only) or Redemption (I am its author - any language, its version of RDOFolder.Items.Find allows to search on GlobalAppointmentId)

Upvotes: 1

Related Questions