C# 是否可以直接打开Outlook会议窗口?
我正试图让我的应用程序打开带有一些预填充字段的Outlook会议窗口 我发现这个问题已经被问过了。 但是,答案中提供的代码(工作正常)不会打开会议窗口,而是打开任命窗口。这两件事在Outlook中处理方式不同,我需要的确实是会议窗口C# 是否可以直接打开Outlook会议窗口?,c#,.net,outlook-2016,C#,.net,Outlook 2016,我正试图让我的应用程序打开带有一些预填充字段的Outlook会议窗口 我发现这个问题已经被问过了。 但是,答案中提供的代码(工作正常)不会打开会议窗口,而是打开任命窗口。这两件事在Outlook中处理方式不同,我需要的确实是会议窗口 有没有办法做到这一点,或者我一定要先打开“约会”窗口,然后邀请其他人将其转换为会议?像在其他问题中一样创建约会,然后设置约会的MeetingStatus属性 Microsoft.Office.Interop.Outlook.Application outlookAp
有没有办法做到这一点,或者我一定要先打开“约会”窗口,然后邀请其他人将其转换为会议?像在其他问题中一样创建约会,然后设置约会的
MeetingStatus
属性
Microsoft.Office.Interop.Outlook.Application outlookApplication = new Microsoft.Office.Interop.Outlook.Application(); ;
Microsoft.Office.Interop.Outlook.AppointmentItem appointmentItem = (Microsoft.Office.Interop.Outlook.AppointmentItem)outlookApplication.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);
// This line was added
appointmentItem.MeetingStatus = Microsoft.Office.Interop.Outlook.OlMeetingStatus.olMeeting;
appointmentItem.Subject = "Meeting Subject";
appointmentItem.Body = "The body of the meeting";
appointmentItem.Location = "Room #1";
appointmentItem.Start = DateTime.Now;
appointmentItem.Recipients.Add("test@test.com");
appointmentItem.End = DateTime.Now.AddHours(1);
appointmentItem.ReminderSet = true;
appointmentItem.ReminderMinutesBeforeStart = 15;
appointmentItem.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh;
appointmentItem.BusyStatus = Microsoft.Office.Interop.Outlook.OlBusyStatus.olBusy;
appointmentItem.Recipients.ResolveAll();
appointmentItem.Display(true);
NineBerries的好解决方案还有一个问题,因为我在这里遇到了一个问题: 线路
appointmentItem.Recipients.ResolveAll();
如果会议中有可选的与会者,则此选项是必需的。
否则,即使您设置了
recipient.Type = Microsoft.Office.Interop.Outlook.OlMeetingRecipientType.olOptional;
之前,这是由于Outlook中的名称“自动解析延迟”(或者看起来是这样)。使用链接代码尝试添加
appointmentItem.MeetingStatus=Microsoft.Office.Interop.Outlook.OlMeetingStatus.olMeeting
之前的.Display()
。可能是重复的。感谢您的帮助。你知道是否有类似的方式显示skype会议窗口吗?@Patsuan抱歉,不知道。不要使用skype。