Staus bar - time

A

Alexander

Hi to all.

I have something as:

function my_f()
dim Characters_Quantity as long
StatusBar = "Retrieving the document size..."
Characters_Quantity = ActiveDocument.Characters.Count
end function

In long document it could take some time. I want to include in StatusBar
some kind of custom counter (means in seconds like: 1, 2, 3...) so while
code counting my StatusBar would looks like:

Retrieving the document size... 1
Retrieving the document size... 2
Retrieving the document size... 3
.. . .

What should I write instead of X?

StatusBar = "Retrieving the document size..." & X

(Windows 95; Word6; very basic libraries included (or Word97))


Tnx in advance,

Alex

PS
Is there any better (faster) way to count characters quantity in acitve
document?
 
G

Graham Mayor

I don't know about Word 6 - it's been a while - but more recent Word
versions have this kind of information to hand through the document
properties.

A {DOCPROPERTY Characters } field would return the number of characters in
the document - instantly! You would of course need to update the field if
you changed the number of characters.

Did Word 97 have Tools > Word Count? This reports the relevant
docproperties.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail (e-mail address removed)
Web site www.gmayor.dsl.pipex.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
A

Alexander

Thank you Graham

But I need it in macro (vb) - not in document or form field.
The only code I've found is
i = ActiveDocument.Characters.Count
and while code retrieving this I need to display time in seconds in my
StatusBar (from 1).

Tnx again,

Alex
 

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