Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 07-17-2019, 10:55 AM   #1
RevJeff
Newly Registered User
 
Join Date: Sep 2002
Posts: 97
Thanks: 8
Thanked 4 Times in 2 Posts
RevJeff
Question Outlook Reference

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

RevJeff is offline   Reply With Quote
Old 07-17-2019, 11:02 AM   #2
arnelgp
Registered User
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 7,610
Thanks: 59
Thanked 2,438 Times in 2,338 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Outlook Reference

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.
__________________
"Never stop learning, because life never stops teaching"

Last edited by arnelgp; 07-17-2019 at 11:11 AM.
arnelgp is offline   Reply With Quote
Old 07-17-2019, 12:35 PM   #3
RevJeff
Newly Registered User
 
Join Date: Sep 2002
Posts: 97
Thanks: 8
Thanked 4 Times in 2 Posts
RevJeff
Re: Outlook Reference

Thank you, that took care of the issue.

RevJeff is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I reference an Outlook published form from Access? mattkorguk Modules & VBA 0 01-27-2015 03:20 AM
Outlook - Issue with missing reference RichO Modules & VBA 8 05-16-2014 06:54 AM
set reference to Outlook from VBA 2003/2007 gem1204 Modules & VBA 12 11-16-2010 08:17 PM
Reference problem? emailing with outlook Zaeed Modules & VBA 20 07-06-2009 11:56 AM
E-mail reference the "Microsoft Outlook xx.x Object Library" teiben Modules & VBA 2 06-18-2004 06:14 AM




All times are GMT -8. The time now is 01:56 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World