none
Get the Meeting replied details in outlook (VSTO) RRS feed

  • Question

  • Hi,

    I have a created a custom meeting form region with the MessageClass as IPM.Appointment.MyCompanyName in outlook 2010 and VSTO. Once the receiver accepted the meeting, it is stored in his calendar. When he opens that meeting later, I want to show the Meeting Received Time and Meeting replied status (whether he has Accepted, Tentative or Declined). How to get this information from that appointment.

    Thanks & Regards,

    Vijay

    Friday, April 10, 2015 3:24 PM

Answers

All replies

  • Hi,

    Since it's related to Outlook Development, I've moved this thread to Outlook for Developers forum.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Regards,

    Melon Chen
    TechNet Community Support


    It's recommended to download and install Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office programs. Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Monday, April 13, 2015 7:34 AM
  • Hello Vijay,

    > When he opens that meeting later, I want to show the Meeting Received Time and Meeting replied status (whether he has Accepted, Tentative or Declined). How to get this information from that appointment.

    The Recipients property of the AppointmentItem class returns a Recipients collection that represents all the recipients for the Outlook item (attendees). The Recipient class provides the following properties you may find helpful:

    MeetingResponseStatus - an OlResponseStatus constant indicating the overall status of the response to the meeting request for the recipient.

    olResponseAccepted

    3

    Meeting accepted.

    olResponseDeclined

    4

    Meeting declined.

    olResponseNone

    0

    The appointment is a simple appointment and does not require a response.

    olResponseNotResponded

    5

    Recipient has not responded.

    olResponseOrganized

    1

    The AppointmentItem is on the Organizer's calendar or the recipient is the Organizer of the meeting.

    olResponseTentative

    2

    Meeting tentatively accepted.

    TrackingStatus - an OlTrackingStatus constant indicating the tracking status for the recipient.

    TrackingStatusTime -  a Date indicating the tracking status date and time for the recipient.

    Monday, April 13, 2015 11:30 AM
  • Hi Eugene,

    We can iterate the recipients collection to get the meeting response status using MeetingResponseStatus from the organizer machine. However, If I am one of the the recipients of the meeting, I will accept that meeting and it will store in my calendar. When I open that meeting later, how to get the following details: 1) By what time I have received this meeting in my inbox and 2) What is the response I have selected (Accepted, Rejected, Tentative, or Proposed New Time) to the organizer.

    Monday, April 13, 2015 11:54 AM
  • There is no special properties for that. You need to handle the Outlook object model events to track the time when the meeting is received (for example, NewMailEx). Also you can repurpose the Ribbon UI controls to be aware what response is chosen in the UI. See Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.
    • Marked as answer by Vijay VSTO Monday, April 13, 2015 12:23 PM
    Monday, April 13, 2015 12:08 PM
  • Thanks Eugene.
    Monday, April 13, 2015 12:23 PM
  • Hi,

    I have added the following code in the ribbon xml.

    <commands>
        <command idMso="AcceptInvitationNoResponse" onAction="HandleMeetingResponse"/>    
        <command idMso="AcceptInvitationEditResponse" onAction="HandleMeetingResponse"/>    
        <command idMso="AcceptInvitationSendResponse" onAction="HandleMeetingResponse"/>    
      </commands>

    This is the corresponding event handler code.

    public void HandleMeetingResponse(Office.IRibbonControl Control, bool Cancel)
            {
                MeetingItem meetItem = Globals.ThisAddIn.Application.ActiveExplorer().Selection[1] as MeetingItem;
                if (meetItem != null && meetItem.GetAssociatedAppointment(false).MessageClass == "IPM.Appointment.CustomMeetingView")
                {
                    UserProperty customUserProp = null;
                    string meetStatus = string.Empty;
                    if (Control.Id.Contains("Accept"))
                        meetStatus = "Accepted";
                    else if (Control.Id.Contains("Tentative"))
                        meetStatus = "Tentatively Accepted";
                    else if (Control.Id.Contains("Decline"))
                        meetStatus = "Declined";

                    customUserProp = meetItem.GetAssociatedAppointment(false).UserProperties.Add("LAMRMeetStatus", OlUserPropertyType.olText);
                    customUserProp.Value = meetStatus;
                    customUserProp = meetItem.GetAssociatedAppointment(false).UserProperties.Add("LAMRMeetReceivedTime", OlUserPropertyType.olText);
                    customUserProp.Value = meetItem.ReceivedTime.ToString("ddd M/d/yyyy h:mm tt");
                    meetItem.Save();
                }

                Cancel = false;
            }

    The default action of the button is not executed after our custom code. How to execute the default action of that button once the custom code is done.

    Monday, April 13, 2015 2:29 PM
  • Vijay,

    I'd recommend asking separate questions on new forum threads. Thus forum readers may recognize questions and answers easily.

    It looks like you forgot to specify the ref keyword for the second parameter of the onAction callback method. 

    Monday, April 13, 2015 6:44 PM
  • Even If I added the ref keyword, the default functionality is not executing.
    Tuesday, April 14, 2015 4:35 AM
  • Earlier I kept the breakpoint in that function and it was not functioning correctly. Once I removed the breakpoint from that function, it is working fine.
    Tuesday, April 14, 2015 5:46 AM