How to insert the field for statistics (number of characters withspaces)

A

avkokin

Hello.
The Word 2003 (Tools-Word Count command) has dialogue which show
statistics. It has the line with statistics of number of characters
with spaces. However I can't found the field for show this statistics.
There is only the field - NUMCHARS (without the spaces).
How to insert the field for statistics (number of characters with
spaces)?
Thank you.
 
H

Helmut Weber

Hi Anton,
The Word 2003 (Tools-Word Count command) has dialogue which show
statistics. It has the line with statistics of number of characters
with spaces. However I can't found the field for show this statistics.
There is only the field - NUMCHARS (without the spaces).
How to insert the field for statistics (number of characters with
spaces)?

I think you would need a docvariable field, and assign
ActiveDocument.ComputeStatistics(wdStatisticCharactersWithSpaces)
to that field, like that:

With ActiveDocument
.Variables("MyCount").Value = _
.ComputeStatistics(wdStatisticCharactersWithSpaces)
.Fields.Update
End With



--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 
M

macropod

Hi avkokin,

You could use a DOCPROPERTY field coded as:
{DOCPROPERTY "CharactersWithSpaces"}

Note that, after inserting the field, updating it will cause it to include itself in the count.
 

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