.netexchange-server-2003

How To Access Exchange 2003 Private (Contact) Items Programmatically


I'm looking for a way to programmatically (.Net) access PRIVATE contact folders on an Exchange 2003 server, to create a subfolder where to create contacts from a database.

The solutions I found so far rely on EWS, e.g. https://social.msdn.microsoft.com/Forums/en-US/aec6c998-f304-439c-9fa7-27bb9a4c4b45/problem-accessing-folders-in-another-mailbox?forum=exchangesvrdevelopment - such examples work for 2007+, the Exchange server I have to target is 2003.

Other examples are outlook Addins.

I need a standalone solution (an executable) that each time it runs, it's creating contacts from a DB into a particular subfolder under user's Contacts folder.

I also searched for some MAPI code samples (.Net) without much luck.

Could you please provide code (either VB.NET or C#) illustrating how to access a private mailbox Contacts folder (or a subfolder), to write a new contact item there?


Solution

  • [Promoted from a comment]

    Entirely stand-alone is going to be problematic, but have a look at Redemption Data Objects which exposes the CDO/RDO mechanism used by outlook. It does require Outlook to be installed, but doesn't require it to be running (it uses the libraries, but doesn't work by automating Outlook).

    We recently started using RDO and are getting much better performance than EWS.

    Even if you don't use that, grab a (free) copy of OutlookSpy by the same company. It will expose a lot of info about how Exchange works internally, especially the data structures is uses (It adds a toolbar to Outlook, it's not stand alone).