Application.Version property (Visio)
Returns the version of a running Microsoft Visio instance. Read-only.
expression.Version
expression A variable that represents an Application object.
String
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 Visio is 15.0.
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
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.