【问题标题】:How to update outlook appointment with c#? [closed]如何使用 c# 更新 Outlook 约会? [关闭]
【发布时间】:2016-09-30 08:26:52
【问题描述】:

我已经用 c# 创建了 Outlook 会议计划。我已将 globalid 保存到数据库中。现在,我需要再次更新我用 c# 创建的会议计划。你能帮我解决一下吗?

最好的问候 费拉特

【问题讨论】:

    标签: c# outlook appointment


    【解决方案1】:

    哪个ID? GlobalAppointmentID 还是 EntryID?对于EntryID,您可以使用Namespace.GetItemFromID,但由于Outlook 在处理会议更新时会重新创建约会,因此其条目ID 会更改,GetItemFromID 将失败。

    GlobalAppointmentID 是要走的路(这是 Outlook 本身在处理更新/取消时使用的方法),但不幸的是 Outlook 对象模型不会让您搜索二进制 (PT_BINARY) 属性,所以您能做的最好的就是循环浏览日历文件夹中的所有项目。您需要使用 Extended MAPI(C++ 或 Delphi)或Redemption(任何语言)-(Redemption 中的RDOtems.Find/FindNext/Restrict` 允许搜索二进制属性)。

    Redemption.RDOSession session = new Redemption.RDOSession();
    session.MAPIOBJECT = outlookApp.Session.MAPIOBJECT; //share the Outlook session
    RDOFolder calendarFolder = session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar);
    Redemption.RDOAppointmentItem appointmentItem  = calendarFolder.Items.Find("GlobalAppointmentID = '"+TheGlobalAppointmentId+ "'");
    

    【讨论】:

      【解决方案2】:

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-07-11
        • 1970-01-01
        • 1970-01-01
        • 2019-12-21
        • 1970-01-01
        • 1970-01-01
        • 2019-12-28
        • 2016-05-16
        相关资源
        最近更新 更多