Delete all shapes but not the images - Possible?
I am trying to create a macro to delete lines (the length of the line varies, but, the width is always set to 0 cm) that have been added to a page, but, every variance I put in, still deletes all the shapes including pictures that I want left in.
I am using the following code:
Dim iShp As Word.Shape
For Each iShp In ActiveDocument.Shapes
With iShp
If iShp.Width = 0 Then
iShp.Delete
End If
End With
Next
For i = ActiveDocument.Shapes.Count To 1 Step -1
ActiveDocument.Shapes(i).Delete
Next i
Is there a way round this so the pictures/illustrations are left in?
|