Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Outlook contact "Notes" Property from .NET

I need to programatically Insert a contact to outlook Contact using C# application. I am using the Microsoft.Office.Interop.Outlook.ContactItem Object.

I am able to set name, email, phone, etc. However, it does not seem to have a property for "NOTES"

How can I set the notes for the outlook contact?

Here is the code I am 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 protected]";

       //no property for newContact.Notes :(

        newContact.Save();
like image 270
Emad Gabriel Avatar asked Feb 17 '10 22:02

Emad Gabriel


2 Answers

As far as I recall, you want newContact.Body

like image 85
Fionnuala Avatar answered Oct 04 '22 19:10

Fionnuala


Outlook saves Notes as Body while saving contact

string  Notes = newContact.Body;
like image 39
RameezAli Avatar answered Oct 04 '22 19:10

RameezAli