multiple versions of Office references

R

R Avery

I have Office 10 and Visio 11 (2003) installed. In VB6, i can only bind
to a reference to Office 11. I think this is a problem, because most
people in the company don't have the Office 11 libraries, and they are
getting errors when loading the Excel COM addin. I have to do more
testing, but I think this might be why.

Can anyone tell me if they think this might be happening, whether or not
this can other problems, and how to i make a reference to a previous
Office library when a newer one is installed.

Any help would be most appreciated.
 
B

Bob Phillips

Use late binding.

Instead of something like

Dim wdApp As Word.Application

Set wdApp = New Word.Application

you would use

Dim wdApp As Object

Set wdApp = CreateObject("Word.Application")

and you don't set a reference in VBE (which is where the problem arises).

but you don't have access to the application constants in this case

One technique is to develop with early binding, and change to late binding
to release. There is a walk-through example at
http://www.xldynamic.com/source/xld.EarlyLate.html
 
R

R Avery

THanks, but let us assume that even though I have the office 11 type
library available, I never want to use it. I only want to use the
office 10 type library, but it does not appear in the References list.
Is there anyway to do this?
 

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