Determining Word Versions (and what codes mean what version)

G

Ganeth

Hi all,

Does anyone know the version numbers for Word 95, 97, 2000, 2002 etc? I need to be able to test for the version of Word that my users have installed, and while I know that Word 2000 = '9.0', as that's the version I have, I've only got a hazy idea about the equivalents for Word 95, 97, etc. The important thing to my application is:

Point the first: Is Word installed at all? (No problem there)

Point the second: If Word is installed, does my code need to run on WordBasic (ie, Word 95 or earlier) or Word.Application (Word 97 or later)? The important thing is what version number Word 97 is, as anything above that will run with word.application and anything before needs wordBasic.

I'm using the following code (1st function found on microsoft.com somewhere) to test for Word versions:

Function WordVersion() As String
Dim obj As Object
' Quick test to determine if Word is
' installed, and return version.
On Error Resume Next
Set obj = CreateObject("Word.Basic")
WordVersion = obj.AppInfo$(2)
obj.AppClose
Set obj = Nothing
End Function

Function partOfOtherFunctionOrSubEtc()

Dim wdVer As String

'get WordVerion's return value
wdVer = WordVersion

If Len(wdVer) < 1 Then

'word is not installed

Else

'word is installed - determine version

If CInt(wdVer) >= 8 Then

'word 97 or above is installed

ElseIf CInt(wdVer) < 8 Then

'word 95 or below is installed

Else

'assume some default installation

End If

End If

End Function
 
D

DA

You can also use Application.Version to check the word
version.

Office 97 was version 8


-----Original Message-----
Hi all,

Does anyone know the version numbers for Word 95, 97,
2000, 2002 etc? I need to be able to test for the
version of Word that my users have installed, and while I
know that Word 2000 = '9.0', as that's the version I
have, I've only got a hazy idea about the equivalents for
Word 95, 97, etc. The important thing to my application
is:
Point the first: Is Word installed at all? (No problem there)

Point the second: If Word is installed, does my code
need to run on WordBasic (ie, Word 95 or earlier) or
Word.Application (Word 97 or later)? The important thing
is what version number Word 97 is, as anything above that
will run with word.application and anything before needs
wordBasic.
I'm using the following code (1st function found on
microsoft.com somewhere) to test for Word versions:
 
C

Charles Kenyon

Word 95 won't run vba. It requires WordBasic.
--
Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://www.addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://www.addbalance.com/usersguide/index.htm>

Word Resources Page
<URL: http://www.addbalance.com/word/wordwebresources.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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