Share via


Application.ProcessID Property

Visio Automation Reference

Returns a unique process ID for a Microsoft Office Visio instance. Read-only.

Version Information
 Version Added:  Visio 2.0

Syntax

expression.ProcessID

expression   A variable that represents an Application object.

Return Value
Long

Remarks

The ProcessID property returns a value unique to the indicated instance. The application doesn't reuse the value until 4294967296 (2^32) more processes have been created on the current workstation.

Example

This Microsoft Visual Basic for Applications (VBA) program shows how to use the ProcessID property to determine the process ID for the current instance of Visio.

Visual Basic for Applications
  
Sub ProcessID_Example ()
Dim vsoApplication As Visio.Application

'Get the current instance of Microsoft Office Visio.
Set vsoApplication = Visio.Application

'Prints the Process ID in the Immediate window. 
Debug.Print "Visio Process ID : "; vsoApplication.ProcessID

End Sub

See Also