Thanks for the response.
> I get the answer 27785 in a second.
For me, that's terrible. I need to display the progress of many hundreds or
even thousands of hits. Even if I only call the progress bar once every 10
hits this is still an unacceptable overhead --- and I will also get a jumpy
bar.
Thanks.
Avraham.
(Btw, greetings from Israel.)
>> same with sentences
Well, I am sure that counting sentences does not work very well on our
machines, so if paras and words take as long then they also won't work.
Maybe I will get around to trying them later.
Thanks.
Avraham.
Helmut Weber wrote:
> Hi Avi,
>
> 1 GHz, 768 MB Ram, 200 pages document,
> insertion point on the last page
>
> MsgBox ActiveDocument.Range(0, Selection.Range.End).Words.Count
>
> I get the answer 27785 in a second.
>
> Same with paragraphs, same with sentences.
>
> Processing lines is something completely different,
> they depend on e.g. pagesetup, printer, font etc.
>
> > ActiveDocument.Range(0, Selection.Range.End).Sentences.Count
>
> convoluted?
>
> How about this one, which is essentially the same.
> Just a bit easier to read, maybe.
>
> Dim rDcm As Range
> Set rDcm = ActiveDocument.Range
> rDcm.End = Selection.Range.End
> MsgBox rDcm.Words.Count
>
>
> Greetings from Bavaria, Germany
>
> Helmut Weber, MVP, WordVBA
>
> Win XP, Office 2003
> "red.sys" & Chr$(64) & "t-online.de"