CDOLive LLC The Premier Resource for Microsoft Collaboration Data Objects             

Outlook Contact Item Viewer

This sample is a simple Microsoft Visual Basic application that uses the Microsoft CDO 1.21 to display a Microsoft Outlook contact item without using Outlook itself. Also it shows how to retrieve a CDO 1.21 message object from a given CDO 1.21 address entry using the CDO 1.21 address book dialog:

After a valid Outlook contact record is selected a window with the Outlook contact data is displayed. Also included is code that detects which phone number is selected on the original Outlook item, how to retrieve categories assigned to the contact and the master categories list (stored in the users local registry). Finally the code also shows how to retrieve Outlook contact custom fields:

Known Issues

This sample can be used only with Microsoft Outlook installed in 'Corporate or Workgroup Mode', using the MAPI provider to access Microsoft Exchange Server.

After installing the Outlook security update this sample will stop working properly because of changes made by Microsoft. For more info on the Outlook security update please check Outlook e-mail Security Update

Note that the Office/Outlook 2000 setup does not install CDO 1.21 by default. You need to run the Office/Outlook 2000 setup and add CDO 1.21 as custom option.


Make sure that Microsoft Outlook is installed in Corporate or Workgroup mode and running properly. In Outlook 2000 make sure CDO 1.21 is installed.

Checked Build

If you would like to use this sample with another language version of Microsoft Exchange Server or Microsoft Outlook, it is possible that the sample will not work without modifications. Please consult the source code for more information. This sample is build and checked for a proper function using the following environment:

  • Microsoft Windows NT Server 4.0, with Service Pack 6a, US English - International
  • Microsoft Exchange Server 5.5, with Service Pack 3, US English - International
  • Microsoft Outlook 2000, Service Release 1, US English - International
  • Microsoft Visual Basic 6, Service Pack 3, US English International
Installation and Configuration
Component Description (30 Kbyte) Visual Basic Project The Microsoft Visual Basic 6 project.

To use the sample, unzip it into a separate folder. Make sure that the CDO 1.21 is registered on your machine and open the project file. If you not have Outlook 2000 installed it is possible that you will get an error that CDO.DLL cannot be found. If so, open the references and select the proper CDO 1.21 library reference.

Load the application into the Microsoft Visual Basic IDE and click "Run", "Start" to run the application and select the Outlook contact you want to view from the address book dialog.