Hi Barbara,
Does anyone know if there is any way to get the word count for headers,
footers, footnotes, etc. for a Word document?
If you want the word count for EVERYTHING, you'll need to walk through all
the "stories" in the Word document. You should find a discussion on that
at word.mvps.org (it's often used for Find/Replace). It can also be
derived from the Help examples on StoryRanges and related topics.
The WordCount is a property of the Range object, which means it also
applies to a StoryRange.
If you're primarily interested in a specific story, then it would look
something like this:
Dim rng as Word.Range
Set rng = ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range
MsgBox rng.WordCount
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail