Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Automation Error (http://www.outlookbanter.com/outlook-vba/10407-automation-error.html)

Lightknight April 3rd 06 09:23 PM

Automation Error
 
I am having issues with the standard VBA code to create mail items. I have a
piece of code that works on 95% of the company's 2003 servers. However,
there are some servers where I receive an Automation error message, The
handle is invalid. I have verified that the Outlook reference library is
correct and the same across servers that are working and not working. I have
unsuccessfully done web searches to try and find any other instances of this
error with the Outlook VBA code. Does anyone have any other thoughts on what
might be causing the error. I can post the specific automation error if
necessary but I have not found anything usefull in researching it.

Sue Mosher [MVP-Outlook] April 3rd 06 10:31 PM

Automation Error
 
Outlook VBA code running on servers? That's a sure recipe for problems. Outlook is not supported for any kind of unattended automation, much less running VBA code on a server that has Outlook installed on it.

I'm sure there's a better way to accomplish your goals.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Lightknight" wrote in message ...
I am having issues with the standard VBA code to create mail items. I have a
piece of code that works on 95% of the company's 2003 servers. However,
there are some servers where I receive an Automation error message, The
handle is invalid. I have verified that the Outlook reference library is
correct and the same across servers that are working and not working. I have
unsuccessfully done web searches to try and find any other instances of this
error with the Outlook VBA code. Does anyone have any other thoughts on what
might be causing the error. I can post the specific automation error if
necessary but I have not found anything usefull in researching it.


Lightknight April 4th 06 03:40 PM

Automation Error
 
Let me clarify. I have VB code in an access database that is used to
generate emails. The environment is a citrix farm, with dozens of potential
citrix servers you can connect to and use the database. For almost all of
the potential citrix servers, the code runs fine, however some of them fail
with the automation error. The code err's on the code line
Set oOApp = CreateObject("Outlook.Application")

"Sue Mosher [MVP-Outlook]" wrote:

Outlook VBA code running on servers? That's a sure recipe for problems. Outlook is not supported for any kind of unattended automation, much less running VBA code on a server that has Outlook installed on it.

I'm sure there's a better way to accomplish your goals.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Lightknight" wrote in message ...
I am having issues with the standard VBA code to create mail items. I have a
piece of code that works on 95% of the company's 2003 servers. However,
there are some servers where I receive an Automation error message, The
handle is invalid. I have verified that the Outlook reference library is
correct and the same across servers that are working and not working. I have
unsuccessfully done web searches to try and find any other instances of this
error with the Outlook VBA code. Does anyone have any other thoughts on what
might be causing the error. I can post the specific automation error if
necessary but I have not found anything usefull in researching it.



Sue Mosher [MVP-Outlook] April 4th 06 03:46 PM

Automation Error
 
The most obvious thing to check is whether those servers have a client antivirus program running that blocks Outlook "scripts" like that. If so, the solution is to turn off such script blocking.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Lightknight" wrote in message ...
Let me clarify. I have VB code in an access database that is used to
generate emails. The environment is a citrix farm, with dozens of potential
citrix servers you can connect to and use the database. For almost all of
the potential citrix servers, the code runs fine, however some of them fail
with the automation error. The code err's on the code line
Set oOApp = CreateObject("Outlook.Application")

"Sue Mosher [MVP-Outlook]" wrote:

Outlook VBA code running on servers? That's a sure recipe for problems. Outlook is not supported for any kind of unattended automation, much less running VBA code on a server that has Outlook installed on it.

I'm sure there's a better way to accomplish your goals.

"Lightknight" wrote in message ...
I am having issues with the standard VBA code to create mail items. I have a
piece of code that works on 95% of the company's 2003 servers. However,
there are some servers where I receive an Automation error message, The
handle is invalid. I have verified that the Outlook reference library is
correct and the same across servers that are working and not working. I have
unsuccessfully done web searches to try and find any other instances of this
error with the Outlook VBA code. Does anyone have any other thoughts on what
might be causing the error. I can post the specific automation error if
necessary but I have not found anything usefull in researching it.




All times are GMT +1. The time now is 07:03 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com