Create Contact using CDO\MAPI

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jerry

    #1

    Create Contact using CDO\MAPI

    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.


  • Jay B. Harlow [MVP - Outlook]

    #2
    Re: Create Contact using CDO\MAPI

    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:


    Hope this helps
    Jay

    "Jerry" <JerryatCheesym ouse.com> wrote in message
    news:eel4BI84DH A.1292@TK2MSFTN GP11.phx.gbl...[color=blue]
    > 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.
    >
    >[/color]


    Comment

    • Cor

      #3
      Re: Create Contact using CDO\MAPI

      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


      Comment

      • Jay B. Harlow [MVP - Outlook]

        #4
        Re: Create Contact using CDO\MAPI

        Cor,
        Yes it was later then normal for me. ;-)
        [color=blue]
        > What has contacts to do with CDO?[/color]
        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

        "Cor" <non@non.com> wrote in message
        news:ev0nfB$4DH A.2416@TK2MSFTN GP10.phx.gbl...[color=blue]
        > 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
        >
        >[/color]


        Comment

        • Cor

          #5
          Re: Create Contact using CDO\MAPI

          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

          [color=blue]
          > Yes it was later then normal for me. ;-)
          >[color=green]
          > > What has contacts to do with CDO?[/color]
          > 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[/color]
          Outlook[color=blue]
          > Express) uses these property based data stores to store & retrieve its[/color]
          mail,[color=blue]
          > 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...
          >[/color]


          Comment

          Working...