Set Visual Studio.Net to Support Multiple Office Versions

B

Bob Dukes

I'm developing a .NET application that will be automating
one or more of the office products. It must support both
Office 2000 as well as Office XP. My understanding is that
to use early binding that will work with both versions, I
should use the Office 2000 9.0 libraries when adding the
reference to my .NET project. My development machine is
currently running .Net 2003 and Office XP and only the
Office XP 10.0 library shows in the COM references. I
don't want to do a complete install of Office 2000. Is
there a minimum install I can do to make the Office 2000
type library available under Visual Studio so I can build
an RCW that will work for both versions of Office that
will let me do my .NET development using my installed
Office XP? I will only be using Office function common to
both versions. Thanks - Bob
 
A

Achint Srivastava [MS]

Hi,
You are right, either you can use late binding or bind to Office 2000 type
library. In either case you should be able to run the application for both
Office 2000 and XP. You can do a minimum install of Office 2000 to install
the type libraries. You can also copy the type libraries from a computer
with Office 2000 into your computer. The files you would need to copy
depend upon the application you are trying to automate. For example if you
are automaing Excel you would need to copy:

C:\Program Files\Microsoft Office\Office \excel9.olb
and
.....Office\mso9.dll

for word it will be msword9.olb and mso9.dll

Thanks!
Achint Srivastava
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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