Shape.Application 属性 (Visio)

返回与某个对象相关联的 Microsoft Visio 实例。 此为只读属性。

语法

expression.Application

expression 一个代表 Shape 对象的变量。

返回值

Application

备注

如果 Visual Studio 解决方案包含 Microsoft.Office.Interop.Visio 的引用,该属性将映射到以下类型:

  • Microsoft.Office.Interop.Visio.IVShape.Application

示例

以下 Microsoft Visual Basic for Applications (VBA) 宏获取与活动文档相关联的 Application 对象并在“立即”窗口中打印其进程 ID 号。

 
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

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。