troubleshooting Question

Automation Error Sending EMail from Access

Avatar of RgGray3
RgGray3 asked on
Microsoft Access
15 Comments3 Solutions396 ViewsLast Modified:
I am receiving the following error...

Err.number =  -2147024770
Err.Description = Automation error
                         The specified module could not be found.


when trying to create an outlook object in my application.

The Declariation and Dim Statements seem fine
'-------------------------------------------------------
Public Sub sbSendMessage(strTo As String, _
                                     strSubj As String, _
                                     strBody As String, _
                           Optional strCC As String, _
                         Optional strBCC As String, _
                        Optional strAttch As String)
         
On Error GoTo ErrorMsgs

Dim objOl         As Outlook.Application
Dim objOlMsg   As Outlook.MailItem
Dim objOlRecip As Outlook.Recipient
Dim objOlAttch As Outlook.Attachment

------------------------------------------------

The error occurs when I try to create the session

'--------------------------------
' Create the Outlook session.
'--------------------------------    
    Set objOl = CreateObject("Outlook.Application")

I have check my references and have a reference to MS OL 11 Lib    (msoutl.olb) file
I have checked Technet, MSDN and every book at my disposal.  I have compared my code to at least 10 other routines from assorted sources.

I do not believe it is the code...

Anyone have a clue as to what may be causing the error?

Rich
ASKER CERTIFIED SOLUTION
ajkamp

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 15 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros