5

我需要使用 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();
4

2 回答 2

6

据我记得,你想要newContact.Body

于 2010-02-17T23:09:26.537 回答
2

Outlook 在保存联系人时将备注另存为正文

string  Notes = newContact.Body;
于 2014-03-07T15:13:43.223 回答