Create Contact using CDO\MAPI

  • Thread starter Thread starter Jerry
  • Start date Start date
J

Jerry

I am trying to create a contact using CDO 1.21. I was wondering if anyone
had any sample code of how they may have done this. I am having trouble
findinf documentation on how this is done. I would like to avoid useing
outlook if possible and write directly to the exchange server if possible.

Thanks
Jerry.
 
Jerry,
Are you looking for CDO examples in general on creating a Contact, or a
C#/VB.NET specific sample on creating a Contact?

IMHO the "preferred" way to create a Contact is with Outlook, as all the
"business logic" is contained within the OOM (Outlook Object Model). You
could use CDO to create the contact however there is a good chance you will
"miss" something...

I believe most if not all of the CDO fields that a Contact item requires is
documented at http://www.cdolive.com however I'm not seeing a specific
example right now.

For info on using CDO or Outlook with VS.NET see:
http://www.microeye.com/resources/res_outlookvsnet.htm

Hope this helps
Jay
 
Hi Jay B,

Or it was very late for you or I can learn again something from you.

What has contacts to do with CDO?

(Other than that it can be one of the suppliers of the email adres etc)

Cor
 
Cor,
Yes it was later then normal for me. ;-)
What has contacts to do with CDO?
Both CDO 1.2.1 & the Outlook Object Model are based on Extended MAPI.
Extended MAPI is used to manipulate PSTs & Exchange Server folders. PSTs &
Exchange Server folders are property based data stores. Outlook (not Outlook
Express) uses these property based data stores to store & retrieve its mail,
calendar, contacts, tasks and other items. Seeing as CDO is allowed to
manipulate the same data, it can be used to read & write contacts.

Extended MAPI is a COM interface that is not Automation friendly...

Hope this helps
Jay
 
Hi Jay B,

I was always sure that CDO was only for smtp mail and the folders where
Mapi. So thanks.

You can say, why did you not look it up yourself, but I saw how late it was
with you yesterday .

Although I had a before a short look of course in the links you did send me
and did not see it.

Thanks,

:-))

Cor
 
Back
Top