【问题标题】:How to set Outlook contact "Notes" Property from .NET如何从 .NET 设置 Outlook 联系人“Notes”属性
【发布时间】:2017-05-05 23:57:55
【问题描述】:

我需要使用 C# 应用程序以编程方式将联系人插入到 Outlook 联系人。 我正在使用 Microsoft.Office.Interop.Outlook.ContactItem 对象。

我可以设置姓名、电子邮件、电话等。但是,它似乎没有“NOTES”的属性

如何设置 Outlook 联系人的备注?

这是我正在使用的代码:

       Microsoft.Office.Interop.Outlook._Application outlookObj = new Microsoft.Office.Interop.Outlook.Application();
        Microsoft.Office.Interop.Outlook.MAPIFolder fldContacts = (Microsoft.Office.Interop.Outlook.MAPIFolder)outlookObj.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderContacts);
        Microsoft.Office.Interop.Outlook.ContactItem newContact = (Microsoft.Office.Interop.Outlook.ContactItem)fldContacts.Items.Add(Microsoft.Office.Interop.Outlook.OlItemType.olContactItem);

        newContact.FullName ="Whatever Name";
        newContact.Email1Address = "Email@domain.com";

       //no property for newContact.Notes :(

        newContact.Save();

【问题讨论】:

    标签: c# .net outlook office-interop


    【解决方案1】:

    据我记得,你想要newContact.Body

    【讨论】:

      【解决方案2】:

      Outlook 在保存联系人的同时将笔记保存为正文

      string  Notes = newContact.Body;
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-12-28
        • 1970-01-01
        • 1970-01-01
        • 2015-03-14
        • 1970-01-01
        相关资源
        最近更新 更多