Missing Outlook 10.0 Object Library

G

Guest

Hi, Our company has PCs with either Outlook 2003 or 2002. The vba code that I
am using to run automated emails from Access requires the Outlook 11.0 Object
Library which is not present on PCs running Outlook 2002. and causes compile
errors.
Is it possible to run the Outlook 11.0 Object Libary on PCs with Outlook
2002, and if so how do download this later version to those PCs?
 
D

Douglas J. Steele

No, it's not possible to change which object library you use.

The best approach would be to use Late Binding, so that you don't have to
set a reference at all.

In essence, you change all of your declarations from:

Dim variable As Outlook.component

to

Dim variable As Object

change all of your instantiations from

Set variable = New Outlook.component

to

Set variable = CreateObject("Outlook.component")

and provide values for any Outlook-related constants you might be using.

Tony Toews has an introduction to the topic at
http://www.granite.ab.ca/access/latebinding.htm
 

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