none
Processing an IPM.Schedule.Meeting.Cancelled request. RRS feed

  • Question

  • I am writing an add-in that allows users to store Appointments and meetings to a database.

    The issue i am having currently is when an external meeting request that has been previously saved to the database is cancelled.

    I am trying to add my own toolbar button so if a user opens the cancellation request It gets deleted from Outlook as well as the associated Database entry is marked as cancelled.

    In the database the Appointment is stored by MapiID.

    I cannot find the link between the IPM.Schedule.Meeting Cancelled request and the actual appointment in Outlook.

    I have tried using the GetAssociatedAppointmentitem() but it returns null anything for the Cancellation request.  here is some sample code.

                ThisAddIn.m_inspector = ThisAddIn.m_OutlookApp.ActiveInspector();
                Outlook.MeetingItem currentMeetingItem = (Outlook.MeetingItem) ThisAddIn.m_inspector.CurrentItem;
        
                if (currentMeetingItem.MessageClass == "IPM.Schedule.Meeting.Canceled")
                    ThisAddIn.m_apptItem = currentMeetingItem.GetAssociatedAppointment(false);
                else
                {
                    ThisAddIn.m_apptItem = currentMeetingItem.GetAssociatedAppointment(true);
                }

    If the MessageClass is of type IMP.Schedule.Meeting.Request GetAssociatedAppointment returns the proper object but it returns null when the MessageClass is of type IPM.Schedule.Meeting.Cancelled.

    Any help would be appreciated.

    Thanks,

    Paul.

    Thursday, September 15, 2011 4:44 PM

Answers

  • Even if you can't get the associated appointment you should be able to get the GlobalObjectID property (a guid) and match that to the GlobalObjectID of the original meeting in the calendar. You can use PropertyAccessor on the cancellatoin item to retieve that property as well as Start and End (for example) and then find appropriate appointments in the calendar based on filtering Start and End.
     
    Here are the DASL property tags to use to retrieve those properties:
     
    Start: "urn:schemas:calendar:dtstart"
    End: "urn:schemas:calendar:dtend"
     
    The Start and End times retrieved that way would be in UTC, ot local time. If you'd need to convert you can use PropertyAccessor.UTCToLocalTime() and .LocalTimeToUTC() for conversions, and you can use PropertyAccessor.BinaryToString() to convert the global id guid binary property to a string.
     
    NameSpace.CompareEntryIDs() can be used to compare the global object id's.
     
    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Paul Snow" <=?utf-8?B?UGF1bCBTbm93?=> wrote in message news:dc57c65c-1705-4aea-951c-31c398b89add...

    I am writing an add-in that allows users to store Appointments and meetings to a database.

    The issue i am having currently is when an external meeting request that has been previously saved to the database is cancelled.

    I am trying to add my own toolbar button so if a user opens the cancellation request It gets deleted from Outlook as well as the associated Database entry is marked as cancelled.

    In the database the Appointment is stored by MapiID.

    I cannot find the link between the IPM.Schedule.Meeting Cancelled request and the actual appointment in Outlook.

    I have tried using the GetAssociatedAppointmentitem() but it returns null anything for the Cancellation request.  here is some sample code.

                ThisAddIn.m_inspector = ThisAddIn.m_OutlookApp.ActiveInspector();
                Outlook.MeetingItem currentMeetingItem = (Outlook.MeetingItem) ThisAddIn.m_inspector.CurrentItem;
        
                if (currentMeetingItem.MessageClass == "IPM.Schedule.Meeting.Canceled")
                    ThisAddIn.m_apptItem = currentMeetingItem.GetAssociatedAppointment(false);
                else
                {
                    ThisAddIn.m_apptItem = currentMeetingItem.GetAssociatedAppointment(true);
                }

    If the MessageClass is of type IMP.Schedule.Meeting.Request GetAssociatedAppointment returns the proper object but it returns null when the MessageClass is of type IPM.Schedule.Meeting.Cancelled.

    Any help would be appreciated.

    Thanks,

    Paul.


    Ken Slovak MVP - Outlook
    Thursday, September 15, 2011 6:30 PM