Click here to Skip to main content
15,993,913 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i get the value of the selected outlook contact in C#?
Posted
Updated 23-Mar-12 16:56pm
v2

1 solution

Try
private void AccessContacts(string findLastName)
{
    Outlook.MAPIFolder folderContacts = this.ActiveExplorer().Session.
        GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts);
    Outlook.Items searchFolder = folderContacts.Items;
    int counter = 0;
    foreach (Outlook.ContactItem foundContact in searchFolder)
    {
        //Access ContactItem properties inside foundCountact
     
    }
    MessageBox.Show("You have " + counter +
        " contacts with last names that contain "
        + findLastName + ".");
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900