Group: microsoft.public.word.vba.general
From: =?Utf-8?B?RUtI?=
Date: Friday, April 04, 2008 6:33 PM
Subject: VBA to determine Word version of a document

Hi,

I need to create a vba macro that will provide info about which version
(fileformat) of Word the active document was saved in.

I tried the following, but no luck:

Sub CheckDocType()
'Assuming that constants are as follows: Format 15 - docx; Format 16 - docm
If ActiveDocument.SaveFormat = 15 Or ActiveDocument.SaveFormat = 16 Then
MsgBox "This document is a Word 2007."
End If
End Sub

Thanks