Version History Macro

I want to find out what version of Solidworks a file wascreated in. Actually, what it was last saved in is most useful tome. Anyway, I have 2004, and the files are either 2006 or 2007. Ihave a short script that works fine for 2004 files, but won't readfuture version files. Mind you, I am not trying to open the files,just read that data from them. When I run this on files that werecreated later, I get a "type mismatch error" on my variant vVer,but works just fine on 2004 files. Any thoughts?

Dim swApp As Object
Dim QFile As String
Dim vVer As Variant

Sub main()

Set swApp = Application.SldWorks
QFile = "c:\\documents and settings\\pegi\\desktop\\21.sldprt"
vVer = swApp.VersionHistory(QFile)
MsgBox vVer(0)

End Sub
SolidworksApi macros