vbaoutlookcalendarremindersrecurrent

Removing Reminders from entire series of appointments in Outlook VBA


I have a simple macro to remove any reminder from the selected calendar appointment:

Public Sub RemoveReminder()
  If Application.ActiveExplorer.Selection.Class = 74 Then
     Application.ActiveExplorer.Selection.Item(1).ReminderSet = False
  Else
    MsgBox "not an appointment"
  End If
End Sub

This works fine when the appointment is a single occurrence, but for recurrent appointments it only changes the one selected instance, not the entire recurring series. How do I modify this code to remove ReminderSet from an entire recurring series for those types of appointments?


Solution

  • The AppointmentItem.Parent property returns the parent AppointmentItem for the recurrence instances and exceptions (master). Setting up properties on the master appointment should affect the series/occurences.

    You can check whether you deal with a occurence or master appointment by using the AppointmentItem.RecurrenceState property which returns an OlRecurrenceState constant indicating the recurrence property of the specified object.