Visio) (Style.Application 属性

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

语法

表达式应用

表达 一个代表 Style 对象的变量。

返回值

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 支持和反馈,获取有关如何接收支持和提供反馈的指南。