Window.SelectAll 方法 (Visio)
會選取視窗或選取範圍內的所有可能的圖形。
語法
運算式。SelectAll
表達 代表 Window 物件的變數。
傳回值
無
範例
這個 Microsoft Visual Basic for Applications (VBA) 巨集將示範如何選取頁面上的所有圖形。
Public Sub SelectAll_Example()
Const MAX_SHAPES = 6
Dim vsoShapes(1 To MAX_SHAPES) As Visio.Shape
Dim intCounter As Integer
'Draw six rectangles.
For intCounter = 1 To MAX_SHAPES
Set vsoShapes(intCounter) = ActivePage.DrawRectangle(intCounter, intCounter + 1, intCounter + 1, intCounter)
Next intCounter
'Deselect all the shapes on the page.
ActiveWindow.DeselectAll
'Select all the shapes on the page.
ActiveWindow.SelectAll
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應