Visio) (Window.Activate 方法
會啟動視窗。
語法
運算式。啟動
表達 會傳回 Window 物件的運算式。
傳回值
無
註解
Microsoft Visio 每次可開啟一個以上的視窗;不過,只有一個視窗會處於使用中狀態。 啟動視窗將可變更 ActiveWindow、ActivePage 及 ActiveDocument 等屬性所傳回的物件。
如果您的 Visual Studio 解決方案包含 Microsoft.Office.Interop.Visio 參考,此方法會對應至下列類型:
- Microsoft.Office.Interop.Visio.IVWindow.Activate ()
範例
下列巨集會建立兩個視窗,然後顯示如何啟動其中一個視窗。
Public Sub Activate_Example()
Dim vsoDocument As Visio.Document
Dim vsoWindow As Visio.Window
'Create two new windows by adding documents.
Set vsoDocument = Documents.Add("")
Set vsoWindow = ActiveWindow
Set vsoDocument = Documents.Add("")
'Use the Activate method to make the first
'window created the active window.
vsoWindow.Activate
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。