Table of contents
TOC
折叠目录
展开目录

Windows.Application 属性 (Visio)Windows.Application Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

返回与某个对象相关联的 Microsoft Visio 实例。只读。Returns the instance of Microsoft Visio that is associated with an object. Read-only.

语法Syntax

表达式应用程序expression . Application

表达式_一个表示Windows对象的变量。_expression A variable that represents a Windows object.

返回值Return Value

ApplicationApplication

示例Example

下面的 Microsoft Visual Basic for Applications (VBA) 宏获取与活动文档相关联的应用程序对象,并输出其进程 ID 号在立即窗口中。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
© 2018 Microsoft