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