Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 11th, 2004, 11:00 AM
Registered User
 
Join Date: May 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
:(

  #2 (permalink)  
Old August 11th, 2004, 11:26 AM
Friend of Wrox
 
Join Date: Aug 2003
Location: , , .
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you tried running this program on other machines? What happens when you open outlook manually?
  #3 (permalink)  
Old August 11th, 2004, 03:53 PM
Registered User
 
Join Date: May 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, I run this program on another machine with the same configuration. It does not error. The object is created and destroyed without slapping the user with a dialog or an error message.

Starting Outlook manually works fine, as expected.

  #4 (permalink)  
Old August 12th, 2004, 04:09 AM
Authorized User
 
Join Date: Apr 2004
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The only idea I can get - try referencing Outlook directly - adding the reference to the project instead of using CreateObject.


webdesign
  #5 (permalink)  
Old August 12th, 2004, 09:09 AM
Friend of Wrox
 
Join Date: Aug 2003
Location: , , .
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you tried running a detect and repair on Outlook?


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automation Error nagarajan123 Access 0 April 30th, 2008 09:22 AM
Outlook Automation in Access arielalevy Access VBA 1 June 27th, 2006 07:00 PM
Outlook '03 automation from Access '03 error Derek_05 Access VBA 2 February 3rd, 2006 06:09 AM
error 7866 when using automation pilmart Access 0 August 29th, 2003 02:57 PM
Outlook 2000 Automation byron Pro VB 6 4 July 10th, 2003 01:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.