Application.Version Property (Visio)

Returns the version of a running Microsoft Visio instance. Read-only.

Version Information

Version Added: Visio 2.0

Syntax

expression .Version

expression A variable that represents an Application object.

Return Value

String

Remarks

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 Visio 2010 is 14.0.

Example

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