Is there a way to retrieve the fileversion in the Database.BeginSave event when the user has choosen like version 2004 in the default SAVEAS command?
I only found the OriginalFileVersion and LastSaveAsVersion property, however I have to add something in the database for version 2004 before it is saved. Or is there another approach?
The Data is stored in the registry
value 30 for 2010
value 24 for 2007
value 18 for 2004
This might help depending on what your doing. it will check the
file and see which version it's currently saved as.
History of the version numbers is found here
Function is2010(ByVal filename As String) As Boolean
Dim rtnCheck As Boolean = False
Dim objReader As IO.StreamReader
Dim txtContents As String
' Check if File Exists
If IO.File.Exists(filename) Then
objReader = IO.File.OpenText(filename)
'Read all the Text in the File
Do While objReader.Peek <> -1
txtContents = objReader.ReadLine()
If txtContents.Substring(0, 6) = "AC1024" Then
rtnCheck = True
' Don't forget to close the file
objReader = Nothing
Thanks for the answer but this is not quite what I'm looking for. However I would have found a solution in c++ : There is a method in the AcApDocument class:
virtual SaveFormat formatForSave() const = 0;
Is there a .NET property or method anywhere that I could query in the Document.BeginSave event?
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register