Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the version of a running Microsoft Office Visio instance.
strRet = object**.Version**
strRet String. The Visio major and minor version numbers.
object Required. An expression that returns an Application or InvisibleApp object.
2.0
Use the Version property of the Application object to verify the version of a particular Visio instance. This information is helpful if your program requires a particular version. Both the major and minor version numbers are returned. The string returned by Microsoft Office Visio 2003 is "11.0".
Determines the version of a saved document.
intRet = object**.Version**
object**.Version** = intExpression
intRet VisDocVersions. The file format version the document is saved in.
object Required. An expression that returns a Document object.
intExpression Required VisDocVersions. The file format version in which to save the document.
2.0
Setting the Version property of a document tells Visio which file format version to save the document in the next time the document is saved. The Visio type library declares constants for file format versions in VisDocVersions.
Microsoft Office Visio 2003 can save a document in the following file format versions.
Constant | Value | Description |
---|---|---|
visVersion60 |
&H60000 |
Visio version 2000 or 2002 document |
visVersion110 |
&HB0000 |
Visio version 2003 document |
When Visio opens a document that was saved in an earlier version format, it converts the document's in-memory representation to the current version. However, when closing the document, Visio recognizes that the document was saved in an earlier version format and allows the user to choose the version in which to save the document.
This Microsoft Visual Basic for Applications (VBA) program shows how to print the version of a Visio instance in the Immediate window.
Public Sub Version_Example()
Dim vsoApplication As Visio.Application
Dim strVersion As String
Dim intDotPosition As Integer
Set vsoApplication = CreateObject("Visio.Application")
strVersion = vsoApplication.Version
intDotPosition = InStr(strVersion, ".")
Debug.Print " Major Version : "; Left(strVersion, intDotPosition - 1)
Debug.Print " Minor Version : "; Right(strVersion, Len(strVersion) - intDotPosition)
End Sub
Applies to | Application object | Document object | InvisibleApp object
See Also | TypelibMajorVersion property | TypelibMinorVersion property