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