MAPI_E_NOT_FOUND when trying to open other user's calendar

  • Thread starter Thread starter Alex Yakhnin
  • Start date Start date
A

Alex Yakhnin

I am trying to open other user's calendar using CDO and getting the
MAPI_E_NOT_FOUND (8004010F) exception. I have a full access to her mail box
and verified that I can successfully open Inbox and Outbox from the CDO. The
code worked fine against Exchange 2007 Beta 2 and it doesn't with the RTM.
The CDO session is openned anonymously.

Any ideas?

Thx... Alex
 
Hi Dmitry,

It fails when I make a call to GetDefaultFolder(0) on the valid session
object.

--
Alex Yakhnin, .NET CF MVP


Dmitry Streblechenko said:
Do you specify both the folder and store entry ids?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Firstly, GetDefaultFolder will return a default folder from the default
store, not somebody's else mailbox.
Secondly, 0 is not a valid enum for GetDefaultFolder. If you need to open
the Calendar folder, you need to specify olFolderCalendar (=9) constant.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Alex Yakhnin said:
It fails when I make a call to GetDefaultFolder(0) on the session object.
 
I am sorry, I am really new to all this Outlook programming thing, but I am
using CDO from C#. Here is the code:

MAPI.SessionClass mySession = new MAPI.SessionClass();

mySession.Logon(System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
true, true, System.Reflection.Missing.Value,
false,
StrExchangeServerName + "\n" +
strUserAliasName);

MAPI.Folder cdoCalendar = (MAPI.Folder)mySession.GetDefaultFolder(0);

And this site seems to suggest that the calendar is 0:

http://www.cdolive.com/cdo5.htm
 
Back
Top