highlighting all characters in a document - including text boxes

J

joel

Hi,
does anyone know how to make Word count ALL the characters in a
document? Using 2000 or 2003 it will include footnotes if asked, but
not text in text boxes. So far I have been reduced to highlighting each
text box individually, getting a character count and adding them up by
hand.

Ideally I would like to be able to highlight everything in the document
and then perform a word count etc. on it. Highlighting everything works
for copying, but does not seem to for counting, changing language etc.
Is there any way to highlight
a) all text, including boxes, and/or
b) all text, including boxes AND headers and footers AND footnotes (in
order to change language, update fields etc).

???

Thanks for any ideas!
 
L

lynn.taylor

Hi Joel - as far as I know there is not a way to do it manually but you
can write a macro that did it:

This character count covers normal text, text boxes, footnotes,
endnote, headers and footers
Sub CountChar()
Dim oStory As Object
Dim CharCount As Long

For Each oStory In ActiveDocument.StoryRanges
CharCount = CharCount +
oStory.ComputeStatistics(wdStatisticCharacters)
Do While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
CharCount = CharCount +
oStory.ComputeStatistics(wdStatisticCharacters)
Loop
Next oStory

MsgBox "Total Characters incl. spaces:" & CharCount & " char"
End Sub

If you wanted to include spaces in your character count replace
wdStatisticCharacters with wdStatisticCharactersWithSpaces.
 

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