Automation error when trying to send email

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have ms access vba code that sends emails via outlook. The problem is that
the code previously working fine is now giving error on the following line
of code;

Set objOutlook = CreateObject("Outlook.Application")

The error is "Run-time error '-2147024770 (8007007e)': , Automation error,
The specified module could nor be found."

What is the problem and how can I fix it?

Thanks

Regards
 
If you get an error from code statements like these:

Dim ol as New Outlook.Application

Set ol = CreateObject("Outlook.Application")

the cause may be an anti-virus program on your computer that has a feature to block Outlook scripting. If so, the solution is to turn off the script blocking feature. You may need to contact technical support for your anti-virus program to find out how to do that.

I've also seen reports that setting the server parameter can resolve this problem in some situations:

Set ol = CreateObject("Outlook.Applicaton", localhost)
 
Hi Sue

Set objOutlook = CreateObject("Outlook.Application", "localhost") has fixed
it for me.

Many Thanks

Regards

If you get an error from code statements like these:

Dim ol as New Outlook.Application

Set ol = CreateObject("Outlook.Application")

the cause may be an anti-virus program on your computer that has a feature
to block Outlook scripting. If so, the solution is to turn off the script
blocking feature. You may need to contact technical support for your
anti-virus program to find out how to do that.

I've also seen reports that setting the server parameter can resolve this
problem in some situations:

Set ol = CreateObject("Outlook.Applicaton", localhost)
 
Back
Top