이를 위해 그렇게 할 수 있습니다, 당신은 당신의 모양을 고유하게 식별 할 어떤 조건을 제공 할 수 있어야합니다; 슬라이드의 유일한 그림 모양, 그렇지 않은 빈 슬라이드의 유일한 모양 또는 처음으로 슬라이드의 모양 수를 계산 한 후에 추가 된 모양 일 수 있습니다. 적용 할 수있는 조건을 적용하면 조건을 만족하는 모양의 배열을 만들 수 있습니다. 그룹을 그룹화하면 그룹화 할 수 있습니다.
Sub GroupCertainShapes()
Dim x As Long
Dim sTemp As String
Dim aShapeList() As String
Dim lShapeCount As Long
With ActivePresentation.Slides(1)
' iterate through all shapes on the slide
' to get a count of shapes that meet our condition
For x = 1 To .Shapes.Count
' Does the shape meet our condition? count it.
If .Shapes(x).Type = msoAutoShape Then
lShapeCount = lShapeCount + 1
End If
Next
' now we know how many elements to include in our array,
' so redim it:
ReDim aShapeList(1 To lShapeCount)
' Reset the shape counter
lShapeCount = 0
' Now add the shapes that meet our condition
' to the array:
For x = 1 To .Shapes.Count
' apply some criterion for including the shape or not
If .Shapes(x).Type = msoAutoShape Then
lShapeCount = lShapeCount + 1
aShapeList(lShapeCount) = .Shapes(x).Name
End If
Next
' and finally form a group from the shapes in the array:
If UBound(aShapeList) > 0 Then
.Shapes.Range(aShapeList).Group
End If
End With
End Sub
MS Powerpoint는 말하고 있습니까? 그렇다면 내장 된 VBA를 사용하십시오. 그렇지 않다면 어쩌면 당신이 묻고있는 것을 확장해야합니다. 또한 당신이 시도한 것을 언급하십시오. –
예 MS Powerpint.i에서 내 문제에 대해 설명했습니다. – mani