当会议响应即将发送时,我需要访问会议请求响应的会议:

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";
}

最佳答案

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

关于c# - 如何获得 session 响应响应的 session 请求?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36628645/

10-17 01:20