Excel and MAPI.Session

P

Paul Andrews

HELP!

I'm completely perplexed. I have an excel spreadsheet with a list of
mailboxes on an Exchange 5.5 server. I've written some vba so that I
can extract and store Scripting Agents from the HiddenMessages
collection of the Inbox folder.

The code iterates through the list of mailboxes and logs on using the
standard Session.Logon method.

I developed on an XP machine with Outlook 2002 using CDO 1.21.
Everything works fine.


The problem:

I then tried to run the vba code on a NT Server 4 (SP6a) and
consistently get 'Can't create object'.

BEFORE YOU CRY "CDO isn't installed!" ... it is! A vbs script
successfully creates the Session object.

Why won't it work in Excel?
I can add "Microsoft CDO 1.21 Library" in the references.
I can browse the object model in the VB Editor in Excel.

Any and all help greatly appreciated!!!
 
B

Bob

Hi Paul,

Is it the same version of Excel in both environments?
Do you really need Excel and VBA? Can't you achieve similar results with
the Windows scripting host?

Bob
 
P

Paul Andrews

Bob,
WSH is the obvious answer ... and would be easier to schedule. I
was just wondering why the excel solution wouldn't work. Excel 2002
was on the development machine and Excel 2000 is on the deployment
machine.

Thanks anyway.

Regards, Paul.
 

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