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
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