0
Answer

setting background theme for the newly added contact in outl

Hima

Hima

10y
503
1
      I am facing a problem in outlook using c#, My Issue is, I want to add a default theme to the contacts that are added newly,
so that i can differentiate with existed one. Here is the code that i have tried.
public void Addcontact_Click(Office.IRibbonControl control)
{
MessageBox.Show("Add Contact");
OutLook._Application outlookObj = new OutLook.Application();
OutLook.MAPIFolder fldContacts = (OutLook.MAPIFolder)outlookObj.Session.GetDefaultFolder(OutLook.OlDefaultFolders.olFolderContacts);
OutLook.ContactItem newContact = (OutLook.ContactItem)fldContacts.Items.Add(OutLook.OlItemType.olContactItem);
newContact.FirstName = "Sai";
newContact.LastName = "S";
newContact.Email1Address = "[email protected]";
newContact.Save();
}
#endregion
Any Help is appreciated,
Thanks in advance