how can one tell if there are any grouped shapes on a page?

S

Slowconn

How can one tell if there are any grouped shapes on a page
(or, in PPT, on a slide)?
 
M

muffet

Hi Slowconn,

Click on to the shapes, and if the shape dots have a cross in the middle;
they are grouped.

Same for PPT.
 
H

Helmut Weber

Hi Slowconn,

Sub TestIIIa()
Dim oShp As Shape
Dim bGrp As Boolean
On Error Resume Next
With Selection.Bookmarks("\page").Range
If .ShapeRange.Count > 0 Then
For Each oShp In .ShapeRange
If oShp.GroupItems.Count > 1 Then
bGrp = True
End If
Next
End If
End With
If bGrp Then msgbox "Grouped shapes on this page"
End Sub


I couldn't find a way without error handling.
Shape and shaperange is a mystery to me.

If it helps, its alright,
otherwise, disregard.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top