How to establish an Outlook "Notes" contact with .NET.

I need to programmatically insert a contact into Outlook Contact using a C # application. I am using the Microsoft.Office.Interop.Outlook.ContactItem object.

I can set name, email address, phone, etc. However, it does not have a property for "NOTES"

How to set notes for an Outlook contact?

Here is the code I'm using:

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
source share
2 answers

As far as I remember, you want newContact.Body

+4
source

Outlook saves notes as body when saving contact

 string Notes = newContact.Body; 
+2
source

Source: https://habr.com/ru/post/1301642/


All Articles