I should have an example at home, but I am not sure. I will have a look tonight.
You will need a reference to CDO (Microsoft CDO x.xx Library). CDO is an abbreviation of Collaboration Data Objects.

If you can't wait, you could have a look at CDOLive