Export (0) Print
Expand All

How to: Programmatically Delete Appointments

This example deletes one instance of a recurring appointment. The example assumes that an instance of a recurring appointment occurs on June 28, 2006, at 08:00.

Applies to: The information in this topic applies to application-level projects for Outlook 2013 and Outlook 2010. For more information, see Features Available by Office Application and Project Type.

private void ThisAddIn_Startup(object sender, System.EventArgs e)
    Outlook.MAPIFolder calendar =

    Outlook.Items calendarItems = calendar.Items;

    Outlook.AppointmentItem item =
        calendarItems["Test Appointment"] as Outlook.AppointmentItem;

    Outlook.RecurrencePattern pattern =
    Outlook.AppointmentItem itemDelete = pattern.
        GetOccurrence(new DateTime(2006, 6, 28, 8, 0, 0));

    if (itemDelete != null)
© 2015 Microsoft