Document.Application Property (Visio)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns the instance of Microsoft Visio that is associated with an object. Read-only.

expression .Application

expression A variable that represents a Document object.

Return Value


If your Visual Studio solution includes the Microsoft.Office.Interop.Visio reference, this property maps to the following types:

  • Microsoft.Office.Interop.Visio.IVDocument.Application

The following Microsoft Visual Basic for Applications (VBA) macro gets the Application object associated with the active document and prints its process ID number in the Immediate window.

Public Sub Application_Example() 
    Dim vsoApplication As Visio.Application  
    Dim vsoDocument As Visio.Document 
    Set vsoDocument = ActiveDocument  
    'Get the instance of Visio associated with the Document object.  
    Set vsoApplication = vsoDocument.Application  
    Debug.Print "The process ID of the Application object associated with the active document is: " & vsoApplication.ProcessID  
End Sub