Search code examples
vbaoutlook

How can I detect when an existing meeting date and time changes?


I use VBA to pull meeting objects from an Outlook calendar into a MS Access table.

Is there a way to detect that an existing meeting has changed? I could check if the attendees and subject are the same and only the date/time is different, but I'm hoping there is a more elegant way.

I was going to loop through meeting objects in the calendar and see if a record with the matching EntryID already exists in the table, but the EntryID changes when the meeting details change.


Solution

  • EntryID is changed for an appointment only if the current user is an attendee and a meeting update is received from the organizer - Outlook recreates the appointment, but its appointment id (Appointment.GlobalAppointmentID) does not change.

    If the appointment cannot be opened by its entry id, you can search the folder for a matching appointment based on the appointment id. Keep in mind that looping through all items in a folder (which can contain thousands of items) can be very slow, but OOM does not allow to search on binary properties in Items.Find/FindNext and Items.Restrict. You can switch to Extended MAPI (C++ or Delphi only) or Redemption (any language, I am its author) - it's version of RDOFolder.Items.Find allows a query against a binary property, e.g. "GlobalAppointmentID = '040000008200E00074C5B7101A...' "