Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automation error w/ VBA Outlook email 1

Status
Not open for further replies.

drchuck59

Technical User
Dec 21, 2004
8
US
When using the common function of

Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem

Set appOutLook = CreateObject("Outlook.Application")

from Access, I get the error:
[Number] = -2147024770
[Description] = "Automation error
The specified module could not be found."

I am referencing MS Outlook 11.0 Object library, and I certainly do have Outlook on this machine. This isn't a security error... I'm writing this at home.

The code is otherwise normal, email code that has worked in the past and is seen on these threads; nothing special. Any ideas how to track down my error?

Thanks!

Chuck

Chuck Kowalewski
Maj, USAF, MC
"Forget world peace. Visualize using your turn signal.
 
And if you use late binding

Dim appOutLook As Object 'Outlook.Application
Dim MailOutLook As Object 'Outlook.MailItem

Set appOutLook = CreateObject("Outlook.Application")
...

could be a previous version of Outlook on this machine you are on! MS Outlook 10.0 Object library?
 
Actually, yes... and no.

In testing at work, the user does have Version 10 Office.

However, at home I have version 11.

Regardless of version, late binding worked in both locations. THANKS! (Kicking myself for not thinking of that on my own.)


Chuck Kowalewski
Maj, USAF, MC
"Forget world peace. Visualize using your turn signal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top