Macro for Ungrouping Presentation

Hello,
I am trying to write a macro that would take all the images in a 
presentation and ungroup them. However, I cannot get it to work correctly.

Here is the code:

Sub UngroupTheOLEs()

Dim oSlides As Slides
Dim oSld As Slide
Dim oShapes As Shapes
Dim oShp As Shape
Dim oShapeRange As ShapeRange

Set oSlides = ActiveWindow.Presentation.Slides
For Each oSld In oSlides
    Set oShapes = oSld.Shapes
    For Each oShp In oShapes
        If oShp.Type = msoEmbeddedOLEObject Or oShp.Type = 
msoLinkedOLEObject Then
            Set oShapeRange = oShp.Ungroup
            oShapeRange.Group
        End If
    Next oShp
Next oSld

End Sub

I ran through the Step-In process and the compiler appears to be skipping 
the actual ungrouping code. Anyone have a suggestion?
0
Utf
6/4/2010 8:10:43 PM
powerpoint 2011 articles. 0 followers. Follow

0 Replies
2581 Views

Similar Articles

[PageSpeed] 56

Reply:

Similar Artilces: