View Single Post
 
Old 03-05-2012, 09:10 AM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,914
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

I struggled with this for years but it is really easy (when you know how!)

Be aware that pictures in placeholders cannot be grouped.

Code:
Sub Group_Pic()
Dim osld As Slide
Dim oshp As Shape
Set osld = ActivePresentation.Slides(1)
'make sure nothing is selected at start or they will be grouped
ActiveWindow.Selection.Unselect
For Each oshp In osld.Shapes
If oshp.Type = msoPicture Then oshp.Select Replace:=False
Next oshp
With ActiveWindow.Selection.ShapeRange
If .Count > 1 Then .Group
End With
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials

Last edited by JohnWilson; 03-05-2012 at 10:13 AM.
Reply With Quote