Need macro to delete blank lines

C

Charlie

Hi everyone,
I need to create a MS Word macro that will delete all blank lines in a
document.

I converted a PDF file to RTF, and I now have 450 pages of
information, of which 70% can be reduced if I can find a way to remove
all the blank lines between all the text lines.

I have searched the net, but only able to find Excel macro's that
deletes entire empty rows. Anyone have any ideas?
 
O

Onno Karman

Hi Charlie,

The code for a line break in Word is ^p.
What you should do is the following:

First: click on the Show/Hide symbol (which looks like a backwards P /
paragraph sign and is positioned in the ) or use the shortcut keys
CTRL SHIFT 8

Then open the "Search and Replace" window (shortcut keys: CTRL H).
In the "Find what:" field, enter this:

^p^p

And in the "Replace with:" field, enter:

^p

Then, click on "Replace All" (or first try it out ofcourse, click on
"Find Next", and see what happens, and then click on "replace all")

You will see that all double line breaks have been replaced by a
single line break.

Of course you could write a macro for this, but I think this is a one
time only "thing".

I hope that this has helped you!

Kind regards,

Onno Karman,
Amsterdam, The Netherlands




Op Tue, 06 Apr 2004 00:41:23 GMT schreef Charlie
 

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