Determining Word Versions (and what codes mean what version)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ganeth (NOSPAMORANYPROCESSEDMEATOFANYKINDWHATSOEVERgarethdart24_at_hotmail.com)
Date: 06/30/04


Date: Tue, 29 Jun 2004 21:54:01 -0700

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



Relevant Pages

  • Determining Word Versions (and what codes mean what version)
    ... >Function WordVersionAs String ... > Dim obj As Object ... >Dim wdVer As String ...
    (microsoft.public.word.vba.general)
  • Re: Active Directory Authentication in IIS 6
    ... Dim obj As Object = entry.NativeObject. ... NMOWeb.FormsAuth.LdapAuthentication.IsAuthenticated(String domain, String ... to keep it on 2000 with IIS 5.1 until we can figure it out. ... I generally recommend people just bind ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • verify and delete mailitem
    ... If the string is not present, ... Public Sub Deletions() ... Dim obj As Object ... I love that you give us web sites to visit and ...
    (microsoft.public.outlook.program_vba)
  • Re: How convert a string to a type for use in reflection
    ... I need to convert any string informed because I cant wonder ... wich type the developer user will put in my xml config file (in my case, ... get from this file to use the reflection). ... Dim obj As Object ...
    (microsoft.public.dotnet.languages.vb)
  • CreateInstance problem
    ... DB and accessed as a string value. ... Dim strobj As String ... Dim obj As Object ...
    (microsoft.public.dotnet.framework.aspnet)