none
Capture the AppointmentID of meeting Item when its cancelled or Deleted from Calender RRS feed

  • Question

  • Hi All,

    I am developing an Add-In that needs to Do a function When I delete / cancel a meeting .

    For this I used the code
    Application app = Globals.ThisAddIn.Application;
    Folder calendarFolder = app.GetNamespace("MAPI").GetDefaultFolder(OlDefaultFolders.olFolderCalendar) as Folder;
     _calcitems.ItemRemove += CalcitemsItemRemove;

    This way the event CalcItemsRemove is called every time something is removed from the CalenderFolder.
    This did serve the purpose well, but strangely this event is called even if the meeting item got accepted.

    Am i doing something wrong here??

    PS: I am open to any other way to handle this scenario .

    Regards,

    Arjun


    --Arjun (-|-)ZzzzZZzzz ...


    • Edited by Arjun_KT Wednesday, September 5, 2012 12:46 PM WrongInfo
    Wednesday, September 5, 2012 12:40 PM

Answers

  • For deleted, use the BeforeItemMove() event for any folders in which you are interested. The target folder passed to you in that event handler will be null if the item is being deleted.
     
    For a cancellation you could handle PropertyChange() for every item in a folder, but that's a bit impractical. I'd probably handle the ItemChange() event on the folder Items collection for each folder of interest.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Arjun_KT" <=?utf-8?B?QXJqdW5fS1Q=?=> wrote in message news:db5f69ee-43a5-4505-8c58-9ebd02903dcd...

    Hi Damian,

    We use the global appointment id to  get details of the appointment.

    My question is how to identify
    -> If an appointment is deleted from the calender Item.
    -> If an appointment is cancelled

    The method that i was following was flawed , and did not serve the purpose.
    Basically i am looking for an event that would be fired in the cases mentioned above

    Regards,

    Arjun


    --Arjun (-|-)ZzzzZZzzz ...



    Ken Slovak MVP - Outlook
    Thursday, September 6, 2012 3:41 PM

All replies

  • outlook is free to delete and recreate appointments anew when it feels like it, so do not depend on entryid - only globalappointmentid will stay the same.
    Wednesday, September 5, 2012 7:30 PM
  • Hi Damian,

    We use the global appointment id to  get details of the appointment.

    My question is how to identify
    -> If an appointment is deleted from the calender Item.
    -> If an appointment is cancelled

    The method that i was following was flawed , and did not serve the purpose.
    Basically i am looking for an event that would be fired in the cases mentioned above

    Regards,

    Arjun


    --Arjun (-|-)ZzzzZZzzz ...


    • Edited by Arjun_KT Thursday, September 6, 2012 8:54 AM added clarification
    Thursday, September 6, 2012 8:53 AM
  • For deleted, use the BeforeItemMove() event for any folders in which you are interested. The target folder passed to you in that event handler will be null if the item is being deleted.
     
    For a cancellation you could handle PropertyChange() for every item in a folder, but that's a bit impractical. I'd probably handle the ItemChange() event on the folder Items collection for each folder of interest.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Arjun_KT" <=?utf-8?B?QXJqdW5fS1Q=?=> wrote in message news:db5f69ee-43a5-4505-8c58-9ebd02903dcd...

    Hi Damian,

    We use the global appointment id to  get details of the appointment.

    My question is how to identify
    -> If an appointment is deleted from the calender Item.
    -> If an appointment is cancelled

    The method that i was following was flawed , and did not serve the purpose.
    Basically i am looking for an event that would be fired in the cases mentioned above

    Regards,

    Arjun


    --Arjun (-|-)ZzzzZZzzz ...



    Ken Slovak MVP - Outlook
    Thursday, September 6, 2012 3:41 PM
  • Hi Arjun_KT,

    Thanks for posting in the MSDN Forum.

    It's based on my experience that Ken's reply is make sense. I will mark it. Please feel free to unmark it if you think there still have some problem.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, September 12, 2012 6:43 AM
    Moderator