Counting nonblank lines in word

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to count nonblank lines within a document without having to
delete all of the blank lines? I am using Word 2000. I count lines to
invoice for medical transcription.
 
If you use styles, there shouldn't be any blank lines? You can achieve the
spacing with the paragraph space before/after parameter of the style.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
It depends on what you mean by "line". Lines can occur in at least three
ways in an uncomplicated Word document:

Paragraph mark (Enter)

Automatic wrapping

Manual line break (Shift+Enter)

Blank lines can occur because of two consecutive paragraph marks, manual
line breaks, or a combination of the two.

Counting non-blank lines could be as simple as counting the lines, then
subtracting the number of blank lines. Counting blanks, therefore, isn't
necessarily trivial. Assuming that you're not using any manual line breaks,
if you press Ctrl+H and change:

Find what:^p^p

Replace with:^&

This searches for two consecutive paragraph marks, and replaces them with
the same.

Choose Replace all, Word will tell you how many "changes" it made, and this
*might* provide the number of blank lines, or at least something close. Note
that this change operation doesn't actually change anything. That's because
^& means "whatever matches the Find what expression". Hence this
find/replace is just a convenient trick to count the number of occurrences
of something in Word.

Note that tables with blank cells, text boxes, and perhaps other
complications can interfere with the accuracy of this method.
 
Back
Top