Populating Outlook contact list from SQL database

We have a database with lots of contacts in, and we would like these contacts to appear in people's contact lists when creating new emails etc.

Is this possible If so, how :)


Answer this question

Populating Outlook contact list from SQL database

  • leecsone

    If you have Exchange Server, you can create something called a "MAPI Address Book Provider", which can access a database.

    Here's a link to the MSDN article on the subject:

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/mapi/html/3a850d4d-2ffe-446b-b21d-036e892f5abe.asp

    Hope this helps.


  • Ben Mills

    Yes, it is possible. You could create an Addin that connects to your DB and imports the contacts to the users' contact list. Creating new contacts is pretty simple:


    Outlook.ContactItem contact = (Outlook.ContactItem) Globals.ThisApplication.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olContactItem);

    // Replace the values in "" with the data from your DB
    contact.FirstName =
    "John";
    contact.LastName =
    "Doe";
    contact.Email1Address = "
    john@example.com";
    // ...
    // finally
    contact.Save();


     


    I also suggest you to check the Outlook Hands On Labs.



  • Populating Outlook contact list from SQL database