如何获得会议响应响应的会议请求?

时间:2016-04-14 16:19:38

标签: c# vsto outlook-addin

我需要访问会议请求,会议响应将在会议响应即将发送时作出响应:

private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
    this.Application.ItemSend += Application_ItemSend;
}

private void Application_ItemSend(object Item, ref bool Cancel)
{
    var meeting = Item as Outlook.MeetingItem;
    if (meeting == null) return;
    if (meeting.MessageClass == MeetingMessageClasses.Declined || meeting.MessageClass == MeetingMessageClasses.Accepted || meeting.MessageClass == MeetingMessageClasses.Tentative)
    {
        var meetingRequest = GetMeetingRequest(meeting);
    }
}

Outlook.MeetingItem GetMeetingRequest(Outlook.MeetingItem meetingResponse)
{
    throw new NotImplementedException("Please help me to implement this");
}

我有这些常数:

public static class MeetingMessageClasses
{
    public const string Canceled = "IPM.Schedule.Meeting.Canceled";
    public const string Request = "IPM.Schedule.Meeting.Request";
    public const string Declined = "IPM.Schedule.Meeting.Resp.Neg";
    public const string Accepted = "IPM.Schedule.Meeting.Resp.Pos";
    public const string Tentative = "IPM.Schedule.Meeting.Resp.Tent";
    public const string Forward = "IPM.Schedule.Meeting.Notification.Forward";
}

1 个答案:

答案 0 :(得分:0)

使用MeetingItem.GetAssociatedAppointment - 请参阅https://msdn.microsoft.com/en-us/library/office/ff867189.aspx