line-drawing objects in Word 2002

F

Frank

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.
 
G

Guest

The easiest way I've found is to use the Select Objects mouse pointer found
on the Drawing Toolbar. Click it to turn it on and then drag from upper left
to bottom right corner of the page and it will select all objects on the
page. Every single pesky little line... and then hit delete to get rid of
them, but retain the text.
Have fun!
 
J

Jay Freedman

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
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
G

Ghost

Thanks all -

I used both tech.s with great success. I now prefer the macro coding because
I placed the macro icon on tool bar. With the click of a mouse, I can delete
all drawn lines at one time.

Once again, I deeply appreciate your time and assistance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top