Help needed for multiple versions of object libraries

S

Suzette

I recently upgraded to Office 2003. I kept a copy of Access 2000 because I
have customers who have Office 2000 and need me to work on their databases.
I just had a problem pop up with this issue. I made a modification to a
form in Access. The customer was no longer able to use the database because
my copy of Office changed the reference (for some code) from Word 9.0 to
Word 11.0. The customer has Office 2000 so they can open the database but
because of the reference change, cannot use it. Is there a way to have
multiple object libraries installed without having to install the entire
program? I would like to have the older libraries for Word and Excel.

Thanks

Suzette
 
T

TC

One way to solve this problem is to use "late binding", instead of
"early binding" as you are currently doing.

Early binding:
dim a as word.application
dim b as word.document
set a = new word.application
set b = a.open "blah"
(etc.)
(needs a reference to the Word library)

Late binding:
dim a as object
dim b as object
set a = createobject ("word.application")
set b = a.open "blah"
(etc.)
(does NOT need a reference to the Word library)

Late binding will use whatever version of the relevant product, is
present on the user's PC.

Look up "early binding" and "late binding" in the Access, VB or VBA
groups.

HTH,
TC
 
S

Suzette

Oh good grief! I knew that. Maybe I was having a second Monday and a total
brain cramp. DUH!

Thanks for the wakup slap.
 
S

Suzette

Another thought though. I'm also trying to move some VBA stuff to DLL's to
reduce file size in a Word template. While late binding works in the case
below, for a DLL I do need to have a reference as I need to be able to use
the "With Events" of the object. So the ability to have older versions of
object libraries would be VERY nice.

Thanks
 
T

TC

Sorry, I'm not sure what to suggest, if you need the reference in order
to use With Events.

Coincidentally, I've just said to someone else, in another group, that
I'm "re-inventing ther wheel" for something - by coding, in VBA, a
function that is already available through various off the shelf
components. The reason that I'm reinventing it, is that the off the
shelf components use With Events, which requires a reference to their
DLLs. I do not want to set a reference, so I can't use With Events, so
the off the shelf components are no good to me, & I am therefore
"rolling my own" in VBA. (For example, my solution will return errors
through a collection or array, rather than invoking an event whenever
an error occurs.)

Cheers,
TC
 
C

Cindy M -WordMVP-

Hi Suzette,
I recently upgraded to Office 2003. I kept a copy of Access 2000 because I
have customers who have Office 2000 and need me to work on their databases.
I just had a problem pop up with this issue. I made a modification to a
form in Access. The customer was no longer able to use the database because
my copy of Office changed the reference (for some code) from Word 9.0 to
Word 11.0. The customer has Office 2000 so they can open the database but
because of the reference change, cannot use it. Is there a way to have
multiple object libraries installed without having to install the entire
program? I would like to have the older libraries for Word and Excel.
If you still have Access 2000 installed, then that library should still be
available on the machine?

If you uninstall everything, then install Office 2000, followed by Office 2003
(keeping everything from Office 2000), then both sets of libraries should be
available on the machine.

"Better" would be to invest in a software like VMWare so that you can create
virtual machines. Then you can have a configuration for each type of software
you use.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top