【发布时间】:2015-05-16 19:14:14
【问题描述】:
是否可以代表当前 Sharepoint 用户在 Sharepoint 页面上创建 Outlook 会议? 我尝试通过单击下一个代码的按钮来创建会议
Application oApp = new Microsoft.Office.Interop.Outlook.Application();
AppointmentItem appointment = (AppointmentItem)oApp.CreateItem(OlItemType.olAppointmentItem);
appointment.Start = DateTime.Now.AddHours(1);
appointment.End = DateTime.Now.AddHours(2);
appointment.Subject = "Some subject";
appointment.Body = "Some body";
appointment.Recipients.Add("user1@somemail.com");
appointment.Recipients.Add("user2@somemail.com");
appointment.Save();
但我在致电约会时收到此错误。收件人
操作中止(异常 HRESULT:0x80004004 (E_ABORT))
当我在控制台应用程序中运行此代码时,它工作正常。有任何想法吗? 提前致谢
【问题讨论】:
标签: sharepoint sharepoint-2010 outlook interop meeting-request