Outlook Automation Error Problem - Can't locate Outlook Module

A

Allan P. London

I have MSOffice Professional 2003 installed on my laptop, and on another
desktop machine. The code below activates Outlook on my desktop machine,
but fails on my lap top and results in a "Automation Error - The specified
module can not be found". Both have identical versions of Excel and Outlook
installed and are running XP SP2.

I assumed that there is something wrong with the Outlook entries in my
registry, so I did a repair. Still had the problem, so I reinstalled
MSOffice on the laptop but my code still can't find outlook! Outlook by
itself seems to run on the laptop with no problem.

I looked at the registry and the entries looked the same for Outlook and
Word but, frankly the registry is Greek to me.

Has anyone had this same problem where VBA can not find the Outlook module?
I really suspect that the Outlook program is not properly registered in the
registry on my laptop machine, but I can't seem to find a way to fix it.

Thanks for your help.

Allan P. London, CPA

_______________________________________________________________________________-


Sub CheckForVersion()
MsgBox UpdateApplied
End Sub

Function UpdateApplied()
'Simple 'Late Binding' Example
'Using Early Binding code with Outlook 11.0 Object Library referenced
results in same error

Dim ol As Object
Dim iBuild As Integer

Set ol = CreateObject("Outlook.Application") '<---- Results in
'Automation Error - The specified module can not be found'
iBuild = Int(Right(ol.Version, 4))

' NOTE: The version number format changed between Outlook 98 and 2000
If iBuild >= 4201 Then
UpdateApplied = True
Else
UpdateApplied = False
End If
Set ol = Nothing

End Function
 

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