none
How to know if delete series or occurrence in outlook 2010 in calendar from right click menu from UI? RRS feed

  • Question

  • I need delete one series in outlook 2010, but when check this item by   

    OlRecurrenceState recurState = olApptNotRecurring;
    m_spItem->get_RecurrenceState(&recurState);

    recurState is always occurrence. I want to know which menu item I selected "Delete Series" or "Delete Occurrence"?





    • Edited by xianpingliu Wednesday, February 4, 2015 6:33 AM
    Tuesday, February 3, 2015 10:40 AM

Answers

  • Hello,

    The GetOccurrence method of the RecurrencePattern class returns a specific instance of the AppointmentItem object on the specified date. Then you may call the Delete method of the AppointmentItem class which removes the item from the folder that contains the item. The Delete method moves the item from the containing folder to the Deleted Items folder. If the containing folder is the Deleted Items folder, theDelete method removes the item permanently.

    The RecurrenceState property of the MailItem class returns an OlRecurrenceState constant indicating the recurrence property of the specified object. You can use it to determine whether it belongs to the recurrence or exceptions and etc.

    Be aware, 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.

    Finally, you may find the How To: Create a new recurring Outlook Appointment item article helpful.

    Tuesday, February 3, 2015 12:19 PM
  • If you need to clear the recurrence pattern, call the AppointmentItem.ClearRecurrencePattern method.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!


    Tuesday, February 3, 2015 2:09 PM

All replies

  • Hi,

    I don't understand your question "select delete series or occurrence in outlook 2010?", could you be more specific.

    Have you checked the recurrence state of that item on the UI?

    The olApptOccurrence means "The appointment is an occurrence of a recurring appointment defined by a master appointment."




    • Edited by jackafx Tuesday, February 3, 2015 11:54 AM
    Tuesday, February 3, 2015 11:22 AM
  • Hello,

    The GetOccurrence method of the RecurrencePattern class returns a specific instance of the AppointmentItem object on the specified date. Then you may call the Delete method of the AppointmentItem class which removes the item from the folder that contains the item. The Delete method moves the item from the containing folder to the Deleted Items folder. If the containing folder is the Deleted Items folder, theDelete method removes the item permanently.

    The RecurrenceState property of the MailItem class returns an OlRecurrenceState constant indicating the recurrence property of the specified object. You can use it to determine whether it belongs to the recurrence or exceptions and etc.

    Be aware, 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.

    Finally, you may find the How To: Create a new recurring Outlook Appointment item article helpful.

    Tuesday, February 3, 2015 12:19 PM
  • If you need to clear the recurrence pattern, call the AppointmentItem.ClearRecurrencePattern method.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!


    Tuesday, February 3, 2015 2:09 PM