Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Sun, 24 Aug 2008 03:56:17 -0700 (PDT),    group: microsoft.public.word.vba.beginners        back       


How to insert the field for statistics (number of characters with spaces)   
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.
date: Sun, 24 Aug 2008 03:56:17 -0700 (PDT)   author:   avkokin

Re: How to insert the field for statistics (number of characters with spaces)   
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
date: Sun, 24 Aug 2008 13:53:35 +0200   author:   Helmut Weber

Re: How to insert the field for statistics (number of characters with spaces)   
Thank you, Helmut!
date: Sun, 24 Aug 2008 09:14:39 -0700 (PDT)   author:   avkokin

Re: How to insert the field for statistics (number of characters with spaces)   
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.

-- 
Cheers
macropod
[MVP - Microsoft Word]


"avkokin"  wrote in message news:20227d82-c977-4702-8271-48d44fa3b1da@t54g2000hsg.googlegroups.com...
> 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.
date: Mon, 25 Aug 2008 08:07:20 +1000   author:   macropod lid

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us