hewillaugh
09-19-2010, 05:04 PM
I am looking to delete all the Pictures on a slide and I have them being processed through a loop.
Dim oPres as ActivePresentation
Dim oShape as Shape
Dim oShapes as Shapes
Set oPres = ActivePresentation
For Each oShape In oShapes
reCheck:
If oShape.Type = 13 Then
oShape.Delete
GoTo reCheck
End If
Next oShape
Before I added the GoTo reCheck, sometimes after deleting a Picture, it would skip deleting a picture and delete the next. My assumption was that after a shape was deleted, oShape would default to the next shape.
After a shape is deleted, by default what is the active selection? Is there a cleaner / tighter way to do this?
Thanks in advance for your help!
Dim oPres as ActivePresentation
Dim oShape as Shape
Dim oShapes as Shapes
Set oPres = ActivePresentation
For Each oShape In oShapes
reCheck:
If oShape.Type = 13 Then
oShape.Delete
GoTo reCheck
End If
Next oShape
Before I added the GoTo reCheck, sometimes after deleting a Picture, it would skip deleting a picture and delete the next. My assumption was that after a shape was deleted, oShape would default to the next shape.
After a shape is deleted, by default what is the active selection? Is there a cleaner / tighter way to do this?
Thanks in advance for your help!