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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

missing microsoft outlook 16.0 object library

Status
Not open for further replies.

robertsquestion

Technical User
Jul 16, 2003
81
0
0
GB
Hi,

We are using a MS Access database (.mdb with .mdw security) that is stored at a central server. The persons that work in this database either have MS Access 2010 or MS Access 2016 installed.
If a user that has got MS Access 2016 installed opens the database, everything works fine.
But if a user that has got MS Access 2010 installed opens the database after that, this user gets following error message:
"Compile error: Can't find project or library"

At Tools/References we noticed the following entry:
"MISSING: Microsoft Outlook 16.0 object library"
If we uncheck this missing entry and check entry "Microsoft Outlook 14.0 object library", then it works fine again for the person that uses MS Access 2010.

But ofcourse we don't want to correct this all the time manually, we would like to have the database running without errors for both MS Access versions.

While googling about this issue, I found following article:

In the database, current VBA is indeed used:
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem

I replaced that by:
Dim appOutLook As Object
Dim MailOutLook As Object
(and followed the other recommendations)

But unfortunately that did not solve it.

In a copy of the database I removed all VBA from the Forms and also removed a VBA module.
After that, we still get "MISSING: Microsoft Outlook 16.0 object library" if we switch from a 2016-user to a 2010-user.

Does anyone have an idea how to solve this?
Is there some other place in the database where I need to do changes?

Thanks in advance for your help!

Regards,
Robert
 
After you setup to use Late Binding per that web link, remove the reference to Microsoft Outlook 16.0 object library - Open the VB Editor, Menu at top Tools / References. Locate the aforementioned reference and remove it. Then you should be fine.

If distributing a database to others that may be using a different version of MS-Office, it is best to use Late-Binding. It is always best to develop with the versioning of required components to be the lowest of that your clientele will be using. This would avoid using new features in a new version that is not supported in prior versions.
 
Hi fdcusa,

Issue solved! So I guess it did not work because after switching off "MISSING: Microsoft Outlook 16.0 object library" I switched on the "Microsoft Outlook 14.0 object library".
But that last step is not needed anymore, I guess because I'm using Late-Binding now (after the VBA changes I've done according to web link).

So thanks a lot for helping me out!

Robert
 
Correct - no reference needed if using Late Binding.

Cheers, John.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top