Outlook Reference (1 Viewer)

RevJeff

Registered User.
Local time
Today, 17:55
Joined
Sep 18, 2002
Messages
125
I have a database that multiple people utilize. It is used to send text messages to drivers though outlook. The problem I am running into is that we use multiple versions of outlook and the Reference is different. One uses "Microsoft Outlook 15.0 Object Library" and the other uses "Microsoft Outlook 16.0 Object Library".

Is there a way to have the database check what version of outlook is on the computer and change the Reference to the correct one?

TIA
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:55
Joined
May 7, 2009
Messages
19,229
you can use Late binding on your code:
Code:
Dim olApp As Object
Dim olMail As Object

Set OlApp = CreateObject("Outlook.Application")
Set OlMail = olApp.CreateItem(0)
if there are outlook constants (ie, olMailItem), inspect it in immediate window to get the value:

?olMailItem

once you completed the conversion, you may safely remove reference to outlook.

to be able to change the reference, one should know which version of office he is using (x86 or x64) and 15 or 16.
since the path to these files (therefore the reference path) is not same.
 
Last edited:

RevJeff

Registered User.
Local time
Today, 17:55
Joined
Sep 18, 2002
Messages
125
Thank you, that took care of the issue.
 

Users who are viewing this thread

Top Bottom