Automation Error

G

Guest

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.
 
S

Sue Mosher [MVP-Outlook]

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

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

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")
 
S

Sue Mosher [MVP-Outlook]

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

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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