I am pretty new at this, so I ask you not to laugh.
I need to count the number of lines in a word document that looks like
this:


0ADDRESS W 868543erterter 5103ertert 85
HPS0400 E 2 F120


W

0ADDRESSW 86854ertertertrt 2134ertert 85
HPS0400 E 2 F110


W

and it goes on for pages sometimes 100 pages. I need to count the
number of lines including empty lines all the way down. I have tried
EOF with no luck.

Thanks ahead.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

Re: Counting Lines by JGM

JGM
Mon Sep 15 17:52:06 CDT 2003

Hi Eltupac

Do you mean you need to know the number of lines and that's it, or within a
macro you need to know the number of lines and then do something with that
number?
If the first case, you do not need a macro:
Go to the File menu, choose Properties, click on the Statistics tab, and
look for the number of line information...
If the second, try this in your code:

ActiveDocument.ComputeStatistics wdStatisticLines

HTH
Cheers!
--
_________________________________________

Jean-Guy Marcil
jmarcil@sympatico.ca

"eltupac" <eltupac.ttdzz@excelforum.com> a écrit dans le message de
news:eltupac.ttdzz@excelforum.com...
> I am pretty new at this, so I ask you not to laugh.
> I need to count the number of lines in a word document that looks like
> this:
>
>
> 0ADDRESS W 868543erterter 5103ertert 85
> HPS0400 E 2 F120
>
>
> W
>
> 0ADDRESSW 86854ertertertrt 2134ertert 85
> HPS0400 E 2 F110
>
>
> W
>
> and it goes on for pages sometimes 100 pages. I need to count the
> number of lines including empty lines all the way down. I have tried
> EOF with no luck.
>
> Thanks ahead.
>
>
>
> ------------------------------------------------
> ~~ Message posted from http://www.ExcelTip.com/
> ~~ View and post usenet messages directly from http://www.ExcelForum.com/
>



Re: Counting Lines by Helmut

Helmut
Mon Sep 15 17:56:06 CDT 2003

Hi,
MsgBox ActiveDocument.ComputeStatistics(wdStatisticLines)!
But don't rely on that too much. It's tricky.
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word 97, NT4.0



Re: Counting Lines by Clayton

Clayton
Mon Sep 15 22:03:05 CDT 2003

If you don't want to count wrapped lines, you can do this:
ActiveDocument.Paragraphs.Count

>-----Original Message-----
>Hi,
>MsgBox ActiveDocument.ComputeStatistics(wdStatisticLines)!
>But don't rely on that too much. It's tricky.
>Greetings from Bavaria, Germany
>Helmut Weber
>"red.sys" & chr$(64) & "t-online.de"
>Word 97, NT4.0
>
>
>.
>