Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2007

Tip: Looking for answers? Try searching our database.

Variable References via vba based on Access version

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cheese_whiz - 13 Mar 2007 21:30 GMT
Hi,

Is it possible to use code to modify references for an application?  Can I,
for example, set up some code that will run when an app is launched and, if
the user's machine has office 10 then a reference to Microsoft Office Word 10
Object Library will be selected even though the development machine had
Office 11?

Boiled down to it's essence, can I add/change/remove references via code
based on some testable criteria like the existence of a particular file on
the computer on which the application is running?

Thanks,
CW
Alex Dybenko - 13 Mar 2007 22:36 GMT
Hi,
you can do so using References collection, believe you will find an example
using it in access help. But not sure this is a good idea, you better remove
reference to word object library and use late binding.

Signature

Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

> Hi,
>
[quoted text clipped - 13 lines]
> Thanks,
> CW
Tim Ferguson - 13 Mar 2007 22:54 GMT
=?Utf-8?B?Q2hlZXNlX3doaXo=?= <Cheesewhiz@discussions.microsoft.com>
wrote in news:503BAF39-E297-44A2-B2EE-683228428EE6@microsoft.com:

> Is it possible to use code to modify references for an application?
> Can I, for example, set up some code that will run when an app is
> launched and, if the user's machine has office 10 then a reference to
> Microsoft Office Word 10 Object Library will be selected even though
> the development machine had Office 11?

It's safer to use late binding and use a default object identifier like
"Winword.Application" without any version number.

Hope that helps

Tim F
Cheese_whiz - 14 Mar 2007 03:40 GMT
thanks a lot for the replies.

I'll look into it.  I don't have a great deal of experience automating word
as it is, but maybe I can figure it out.

CW

> =?Utf-8?B?Q2hlZXNlX3doaXo=?= <Cheesewhiz@discussions.microsoft.com>
> wrote in news:503BAF39-E297-44A2-B2EE-683228428EE6@microsoft.com:
[quoted text clipped - 11 lines]
>
> Tim F
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.