vba写如下代码:
Public Sub Test()
Dim str1 As String
str1 = "@type='" & "rectangle" & "'"
Application.ActivePage.Shapes.FindShapes("", 0, False, str1).CreateSelection
End Sub
[bool Recursive = true/false Recursive作用:指定是否遍历所有对象]
Recursive = false 时,运行Test,对象群组下的两个矩形并没有被选取。
Public Sub Test()
Dim str1 As String
str1 = "@type='" & "rectangle" & "'"
Application.ActivePage.Shapes.FindShapes("", 0, True, str1).CreateSelection
End Sub
Recursive = true时,运行Test,对象群组下的两个矩形被选取。