我有以下代码来弹出一个 Outlook 应用程序。它工作得很好,除非我点击“邀请与会者”,否则我无法在弹出窗口中看到实际的与会者文本框。当我单击 appt 项目上的该按钮时,它确实显示了我在下面填充的人员列表。
public void BookAppt(List<string> rooms, DateTime startTime, DateTime endTime)
{
var PacktAppointmentItem = (Microsoft.Office.Interop.Outlook.AppointmentItem)Globals.ThisAddIn.Application.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);
PacktAppointmentItem.Subject = "Test Meeting";
PacktAppointmentItem.Location = "My Room";
PacktAppointmentItem.Start = startTime;
PacktAppointmentItem.End = endTime;
PacktAppointmentItem.Body = "Test Meeting";
PacktAppointmentItem.RequiredAttendees = String.Join(";", rooms);
PacktAppointmentItem.Display(true);
}
有什么方法可以自动显示与会者的文本框而无需单击“邀请与会者”按钮?另外,无论如何以编程方式调用“检查名称”以便解决与会者?