- Code : Tout sélectionner
Sub Initialize
Dim appWord As Variant
Set appWord = CreateObject("word.application")
If appWord.Version = "8.0" Then
Msgbox "97"
Elseif appWord.Version = "9.0" Then
Msgbox "2000"
Elseif appWord.Version = "10.0" Then
Msgbox "XP"
Elseif appWord.Version = "11.0" Then
Msgbox "2003"
Elseif appWord.Version = "12.0" Then ' A vérifier
Msgbox "2007"
End If
Set appWord = Nothing
End Sub
Dans le createobject mettre excel.application et le code devrait être valable.