View Single Post
 
Old 12-13-2011, 02:07 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi AlmostFriday,

the code:
Code:
For i = ActiveDocument.Shapes.Count To 1 Step -1
ActiveDocument.Shapes(i).Delete
Next i
guarantees all shapes will be deleted. Also, your statement:
Quote:
the length of the line varies, but, the width is always set to 0 cm
doesn't make a lot of sense to me. A varying length suggests a non-0 width. Perhaps by 'length' or 'width' you meant 'height'? In any event, you might try something along the lines of:
Code:
Dim iShp As Shape
For Each iShp In ActiveDocument.Shapes
  With iShp
    If .Type = msoAutoShape Then .Delete
  End With
Next
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote