none
Can I combine single appointment 1, 2, 3 to one recurring appointment in outlook? RRS feed

  • Question

  • I schedule three single appointment from outlook from calendar, can I combine these single appointments to one recurring appointment by outlook API?

    • Edited by xianpingliu Wednesday, February 4, 2015 7:51 AM
    Wednesday, February 4, 2015 7:48 AM

Answers

  • Hello Xian,

    The Outlook object model doesn't provide any direct method for combining existing appointments into a series. You need to use the GetRecurrencePattern method of the AppointmentItem class to set up a RecurrencePattern object that represents the recurrence attributes of an appointment. If there is no existing recurrence pattern, a new empty RecurrencePattern object is returned. Thus, you can choose the first appointment item on the calendar and set up its recurrence pattern, then you will need to delete old two appointments.

    Here is what MSDN states for recurrent appointments:

    When you work with recurring appointment items, you should release any prior references, obtain new references to the recurring appointment item before you access or modify the item, and release these references as soon as you are finished and have saved the changes. This practice applies to the recurring AppointmentItem object, and any Exception or RecurrencePattern object. In C#, explicitly release the memory for that object (see ReleaseComObject method of the Marshal class).

    Note that even after you release your reference and attempt to obtain a new reference, if there is still an active reference, held by another add-in or Outlook, to one of the above objects, your new reference will still point to an out-of-date copy of the object. Therefore, it is important that you release your references as soon as you are finished with the recurring appointment.

    Wednesday, February 4, 2015 9:25 AM