PowerPoint allows you to have shapes with the same name on a single slide. This is really bad coding! When you delete though it only deletes the first shape with that name!
To get them all try:
Sub deletePix()
Dim osld As Slide
Dim lngCount As Long
'insert the real name instead of Picture 2
Const PicName As String = "Picture 2"
On Error Resume Next
For Each osld In ActivePresentation.Slides
For lngCount = osld.Shapes.Count To 1 Step -1
If osld.Shapes(lngCount).Name = PicName Then osld.Shapes(lngCount).Delete
osld.Shapes(PicName).Delete
Next lngCount
Next osld
End Sub
|