【问题标题】:Create Outlook meeting on SharePoint page在 SharePoint 页面上创建 Outlook 会议
【发布时间】: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


    【解决方案1】:

    Considerations for server-side Automation of Office 文章声明如下:

    Microsoft 目前不推荐也不支持从任何无人值守、非交互式客户端应用程序或组件(包括 ASP、ASP.NET、DCOM 和 NT 服务)自动化 Microsoft Office 应用程序,因为 Office在此环境中运行 Office 时可能会出现不稳定的行为和/或死锁。

    如果您要构建在服务器端上下文中运行的解决方案,您应该尝试使用已确保无人值守执行安全的组件。或者,您应该尝试找到允许至少部分代码在客户端运行的替代方案。如果您使用服务器端解决方案中的 Office 应用程序,该应用程序将缺少许多成功运行所需的功能。此外,您将在整体解决方案的稳定性方面承担风险。

    如果您处理 Exchange 配置文件,您可以考虑使用 EWS(Exchange Web 服务)。有关更多信息,请参阅EWS Managed API, EWS, and web services in Exchange

    【讨论】:

    • 我同意尤金的观点。尽管这是一种不同的方法,但创建一个连接到 SharePoint 的 Outlook 插件是完全可以接受的并且有据可查。
    猜你喜欢
    • 2010-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-27
    • 1970-01-01
    • 2012-06-06
    • 1970-01-01
    相关资源
    最近更新 更多