How to use CDO object with C#

How to use CDO with C# to access calender data from the MS Exchange server.
if possible provide example..


Answer this question

How to use CDO object with C#

  • robnrie

    Hi Kalpesh

    We have referenced to the following CDO 1.21 which has full reference to the Appointment object through the MAPI.Session class.

    This is still not a PIA based solution so there are some quirky things to watch out for that the MSDN Articles mentioned refer to but basic Appoinment access works fine.

    Regards
    Mike Walker MVP
    Visual Developer VSTO



  • eastw

    from the response... it seems this couldn't be done... I'm not sure but i'm trying to do the same thing now and searching around without clue yet. Same as what u said, I can't figure out the .Appointment object in my CDO library (cdo for windows on xp machine) and so I couldn't get out calendar data yet. Hope someone can help ..

    Cheers, Andy



  • Smartphone Newb

    Hi
    My problem is that i want to access calendar data from exchange server using MAPI but i didnt get basic guide regarding this. if poss plz provide me with some link or guide...

    Thnx
    Kalpesh


  • hvac-r_tech

    Thankx.
       I want to add and retrive Apoointment and meeting data from the exchange server 2003.
      i have put ref of Microsoft CDO for 2000
    but i am not finding CDO.Appointment in that.
    is it possible to get Appointment and meeting data using MAPI. if then how...


  • Chowkilla Nagarjuna

    Hello

    Finally i have decided to use CDOEX (CDO for exchange 2000) in my application with ASP.NET and C#. But till date i didnt found any detail document on how to use CDOEX to access Exchange data.
            In my application i need to access Calendar(i.e. Meetings) data and display that data on the web page. please anybody knows how to retrive meeting data from the exchange servers public folder.
            if possible plz provide me with example.


    Thanx a lot
    Kalpesh

  • lavelyj

    Hello all;

    Ok, here is the story... CDO 1.2.1 is not supported or advised to be used under any .NET thread. Same goes for anything MAPI. Watch-out for third-party APIs which do this under the covers - they are not supported. CDOEX should work fine - set a reference to generate an interop from Visual Studio. Note that you want to set the reference to CDOEX with no references to ADO already set - if you have done this, close the project after removing the references and kill the cdo and ado interops (erase them), then go back into VS and add a reference to CDOEX ONLY - this will also cause an interop for ADO to be properly generated (known issue at MS).

    CDOEX is only supported on the Exchange server - if you try to run it off the box, then you are not walking path and need to get back on track. To do this - run the code on the exchange server. If you need to call the code off-server, then put it into COM+ or a web service - should work fine.

    If you want to try WebDAV - then look for my WebDAV 101 document at:

    http://blogs.msdn.com/webdav_101/

    Also check-out Matt's blog at

    http://blogs.msdn.com/mstehle/

    and of course Steve's blog at:

    http://blogs.msdn.com/stephen_griffin/

    Thanks,

    Dan



  • Blue Einstein

    Hi Kalpesh,

    It is possible. Firstly you must use COM-interop to use CDO from C#.

    Here are a couple of example articles:
    http://support.microsoft.com/default.aspx scid=kb;en-us;310557

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/e2k3/e2k3/_exch2k_using_com_interop_in_csharp.asp

    You can find details of CDO for Exchange  and lots of samples in the Exchange Center.

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnanchor/html/exchangesvr.asp

    Hope that helps.

    Darryn

    [Microsoft]


  • How to use CDO object with C#