PDA

View Full Version : auto add reffrences to vba code



Trevor
03-12-2008, 11:11 PM
does anyone know if it is possable to have access auto add/change ms-outlook library referrences to access through vba ?
Ie: I have access 2003 set up to read mail from outlook 2003, is there a way to code access so that if I install say MS office suit 2007 the library refference(s) for outlook will auto change to the outlook 2007 library(s), or say I went in the oposit direction (for some unknown reason) Say I Uninstaled office suit 2003 and installed office suit 2000 that the library(s) for outlook in acces would then change to the 2000 outlook library(s)?

Carl A
03-13-2008, 02:32 PM
This involves late binding. The knowledge base has one for Excel and here is one for access

http://tinyurl.com/2on4u4

Trevor
03-13-2008, 05:04 PM
so If I intrpreted the late binding correctly, I can just copy the code to a form, and on load
GoTo CheckRefs:

I would like to do this w/o a macro , only because MS always says( "we're going to do away with macro's") and I just want to not have any in this project for when that day does come (if it ever does)

Carl A
03-14-2008, 08:54 AM
I would like to do this w/o a macro , only because MS always says( "we're going to do away with macro's") and I just want to not have any in this project for when that day does come (if it ever does)

I wouldn't worry about Microsoft doing away with Macros or VBA as it would cost Billions to American Financial Institutions. I suppose in the normal flow of technology it will eventually happen.
If Microsoft were to in their next version of Office were to do away with VBA and port to C# or .net just how many copies do you think they would sell?

IMHO

Trevor
03-14-2008, 02:38 PM
good point but the secnd you doubt M$ they do the unthikable
ie: no more classic logon screen w/windows vista
or the new ui toolbar fo office suite 2007