是否可以代表当前 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))
当我在控制台应用程序中运行此代码时,它工作正常。有任何想法吗?提前致谢