Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Automation Error

Status
Not open for further replies.

www2004

Programmer
Aug 11, 2004
15
0
0
US
I am running WinXP Professional SP1, Outlook 2002 (I have installed all critical windows updates). I've run this code a million times before, no problem. Recently I've been getting a 'Choose Profile' dialog and a Windows Script Host error when running the code in vbs. This only happens if there is no Outlook running at all. If Outlook is running, I do not get an error. This happens regardless of number of profiles setup, or if any of these profiles is the default or not. The first time it runs, I get the login dialog and the error, but an Outlook object is created, as I can see it in Task Manager. I run the code again, and this time no error since Outlook has been instantiated. Has anyone come across this problem? Any suggestions?

The error is:

Code: 80010108
Error: The object invoked has disconnected from its clients.


The code is:

Set oOL = CreateObject("Outlook.Application")
Set oOL = Nothing
 
Outlook 2002 will not let you access the account via SMTP. New security features. If Outlook is open then so is the security.

Casper

There is room for all of gods creatures, "Right Beside the Mashed Potatoes".
 
I have the exact same configuration on another machine. I do not have this problem on that machine.

On the machine with error, I've even tried this script:

Set oOL = CreateObject("Outlook.Application")
Set nsMAPI = oOL.GetNameSpace("MAPI")
nsMAPI.logon "Outlook", "", False, False
Set oOL = Nothing
msgbox "done"

Where "Outlook" is a valid profile on the machine. Same error. Under these conditions, how do I ever start Outlook programatically????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top