Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 08-11-2004, 11:50 AM   #1 (permalink)
www
 
Newb Techie

Join Date: Aug 2004

Posts: 2

www

Angry Outlook Automation Error

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
www is offline  
Old 08-11-2004, 12:08 PM   #2 (permalink)
 
Banned

Join Date: May 2003

Posts: 105

imported_Jack

Default

Where are you running this code from? Also, what else are you doing in this script other than creating an object and destroying it?
imported_Jack is offline  
Old 08-11-2004, 12:15 PM   #3 (permalink)
www
 
Newb Techie

Join Date: Aug 2004

Posts: 2

www

Default

I'm getting this error when I run this code in a vb exe as well as a .vbs file.

This is all the code I have to run to get the error. I can add code to it, but it doesn't change anything. The dialog is in response to the CreateObject call.

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

I run this same code on another machine with the exact same configuration and do not get the error. I've reinstalled Outlook on the machine showing the error, but no change.
www is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On