View Single Post
  #3   Report Post  
Posted to microsoft.public.word.newusers
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default line-drawing objects in Word 2002

On Sun, 18 Mar 2007 20:12:08 -0500, "Frank"
wrote:

I converted a batch of PDF files to Word documents, and the underlining in
the PDF came out as text with line-drawing objects (lines) under it. It's
hard to select these objects when they are so close in between lines of
text. I would prefer to run a macro that would simply delete all of them (I
can easily go back and manually underline the few things like titles that
really need underlining, with real Word underline formatting). But I don't
see any special character or special formatting command in the advanced
search and replace. What's the trick to searching for all
line-drawing-object lines and replacing them with nothing (i.e., deleting
them)? Thanks.


You can't use Replace to remove drawing objects. The macro you want
would be hard to record, but it's trivial to write from scratch:

Sub NoLines()
Dim oShap As Shape
For Each oShap In ActiveDocument.Shapes
If oShap.Type = msoLine Then
oShap.Delete
End If
Next
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.