Discussion:
Multiple versions of word
(too old to reply)
Joseph Halberstam
2004-11-06 23:45:01 UTC
Permalink
Hi,

I need to create a com add-in that will run in all versions of Excel and
Word 2000 and higher.

Anyone have suggestions???

Thanks,

-Yossi
Jezebel
2004-11-07 01:28:15 UTC
Permalink
1. Develop it using the earliest version of these products that you intend
to support.

2. Use CreateObject and GetObject to instantiate your reference to the
applications (instead of adding a project reference). You might find it
convenient to use a project reference while you're developing, to get the
benefit of intellisense and syntax checking; but remove the reference before
compiling -- then the app will use whatever version the user actually has
installed.

3. Use the Application.Version property to check whether the user has an
acceptable version.
Post by Joseph Halberstam
Hi,
I need to create a com add-in that will run in all versions of Excel and
Word 2000 and higher.
Anyone have suggestions???
Thanks,
-Yossi
Steve Rindsberg
2004-11-07 16:07:32 UTC
Permalink
Post by Jezebel
3. Use the Application.Version property to check whether the user has an
acceptable version.
And note that .Version returns a string that doesn't necessarily contain
all-numeric characters. Something like:

If Application.Version > 8 Then

will work most of the time but will error if you run it in Office 97 SR1a I
think it is, which returns "8.0b" for .Version

It seems safe to use:

If Clng(Val(Application.Version)) > 8 Then

Loading...