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 支援與意見反應