Automating different versions of Office

Automating different versions of Office

Post by Metro Saup » Fri, 19 Sep 2003 01:10:09

Does anyone have a suggestion or pointers to discussions regarding good ways
for an application to support automating multiple versions of MS/Office?
Our application currently uses the MS/Interop for Office/XP. With the
advent of Office 2003 right around the corner and users gradually upgrading
to Office/2003, I know this will be a problem for us.

Any suggestions or links to discussions of this topic would be appreciated.

Best regards,


Automating different versions of Office

Post by Robert Jac » Fri, 19 Sep 2003 05:36:27

I'm developing a VB.Net add-in that works with Word 2000, Word XP and --
hopefully -- Word 2003. The trick is just to use the object library for the
earliest verion that you're targeting -- for me, the Word 9.0 (Word 2000)
type libraries.

(I did a dual side-by-side install of Word 2000 and Word XP on my
development machine -- just change the default installation directory for
one, and it works fine.)

The later type libraries, like the Word 10.0 (Word XP) libraries, should
just be supersets of the earlier ones. So, if my assembly gets deployed on
a machine with XP, it should be able to use the 10.0 library even though my
program was developed against the 9.0 library. (I haven't tested the
deployment issues yet, though, so you'll want to double-check this.)

The only downside, of course, is that you can't use the new features
introduced in later type libraries -- such as Smart Tags for Word XP.

Hope this helps,
Robert Jacobson



Automating different versions of Office

Post by v-phuan » Fri, 19 Sep 2003 17:31:26

Hi Metro,

I agree with Robert's suggestion, in addition, you may try to use late
binding to handle multiple version COM compatibility.

Peter Huang
Microsoft Online Partner Support
Get Secure!
This posting is provided "as is" with no warranties and confers no rights.