C# 2.0 MAPI wrapper

G

Gonzo Net

Has anyone got 2.0 C# working with MAPI and CDO. I can get it to work
with VB but not C#. Here is a sample of VB code:

Imports MAPI
Imports MAPI.CdoDefaultFolderTypes
______________________________________
Dim CdoMessages As MAPI.Messages
Dim cdoSession As MAPI.Session
Dim CdoFolder As Folder
Dim CdoMessage As MAPI.Message

cdoSession = New MAPI.Session
cdoSession.Logon("bomcng", , False, True)
CdoFolder = cdoSession.GetDefaultFolder(CdoDefaultFolderInbox)
CdoMessages = CdoFolder.Messages

Does anyone have a working comparable code snippet for C#?

Larry Jones
 
S

Sue Mosher [MVP-Outlook]

You're ahead of me. I have plenty of failures trying to use CDO 1.21 in VB.Net in VS 2005. Bottom line is that it's unsupported. Your mileage may vary.

If you want input on your C# approach, though, I'd suggest that you post the code that you've tried and point out what didn't seem to work.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top