How to get Word application version using vb.net

Following example shows that how to find MS Word application version number which is installed on your machine.

In this example we use Microsoft.Office.Interlope.Word library, so add reference of this library before use this code sample

Private Sub CheckMSWordVersion()
        Dim oApp As Word.Application
        Dim BuildNumber As String
        Dim MSWordVersion As String
        oApp = New Word.Application
        BuildNumber = oApp.Version
        Select Case BuildNumber
            Case "7.0"
                MSWordVersion = "97"
            Case "8.0"
                MSWordVersion = "98"
            Case "9.0"
                MSWordVersion = "2000"
            Case "10.0"
                MSWordVersion = "2002"
            Case "11.0"
                MSWordVersion = "2003"
            Case "12.0"
                MSWordVersion = "2007"
            Case "14.0"
                MSWordVersion = "2010"
            Case Else
                MSWordVersion = "Not able to get"
        End Select
        oApp = Nothing
    End Sub