OLK2007 : The Oper Failed : Application.CreateObject("MAPI.Session

B

Bill Billmire

Hello,

In previous versions of Outlook (e.g., 2000, XP, 2003) the statement
Application.CreateObject("MAPI.Session") would correctly return the
MAPI.Session.
In Outlook 2007 this statement errors out indicating "The Operation Failed".

What can I do to make it work in Outlook 2007?

Thanks in advance...
 
B

Bill Billmire

Thanks Sue (that worked) - I was researching this issue and found Microsoft's
reference to removing CDO on installation of Office 2007; and then, they
seemed to indicate (elude) that they had done away with the need for CDO...
"Enhancements to Outlook objects and collections". "Because the Outlook
2007 object model includes more than 85 new objects", etc. I was assuming
there would be other measures to perform similar tasks that were handled by
the CDO API.

On another topic... What do you recommend for a development environment for
VBScripting (these days - Jan 2007)? It would be great to be able to use the
..net environment (or something comparable) to code & debug in. OLK2007 seems
to include a Visual Basic "tool" in the form developer interface, but I have
not been successful in "porting" my VBScript into that.
 
S

Sue Mosher [MVP-Outlook]

The enhanced Outlook object model can indeed do most (but not all) of what CDO 1.21 can do. However, that doesn't eliminate the need to actually write the code to work with the new objects that provide that functionality.

I use Outlook VBA to prototype and test all my VBScript code for Outlook forms. Making the minor adjustments to convert VBA to VBScript takes almost no time at all.

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

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


Bill Billmire said:
Thanks Sue (that worked) - I was researching this issue and found Microsoft's
reference to removing CDO on installation of Office 2007; and then, they
seemed to indicate (elude) that they had done away with the need for CDO...
"Enhancements to Outlook objects and collections". "Because the Outlook
2007 object model includes more than 85 new objects", etc. I was assuming
there would be other measures to perform similar tasks that were handled by
the CDO API.

On another topic... What do you recommend for a development environment for
VBScripting (these days - Jan 2007)? It would be great to be able to use the
.net environment (or something comparable) to code & debug in. OLK2007 seems
to include a Visual Basic "tool" in the form developer interface, but I have
not been successful in "porting" my VBScript into that.
 

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