
Click OK to add the word count field to the document. Under Categories, click Document Info, and then, under Field Names, click NumWords. It appears that when using a Range, the IncludeFootnotesAndEndnotes parameter is not available. Click on the place in the document where you want the word count to appear. It doesn't work, giving an error that there are too many parameters. In the Field names list, select NumWords, and then select OK. Select in your document where you want the word count to appear.
#Microsoft word word count with coding update
However, when I add the True parameter to ComputeStatistics(wdStatisticWords, True), to IncludeFootnotesAndEndnotes, as in: WordCount = ActiveDocument.Range(Start:=pos1, End:=pos2).ComputeStatistics(wdStatisticWords, True) Newer versions 2010 Word can insert the word count into your document and update that information as often as you want. Youll see the number of characters and words increase or decrease as you type, delete, and edit them. This was built in Word 2010, but will probably work in the newer versions. To check word count, simply place your cursor into the text box above and start typing.
#Microsoft word word count with coding code
I brewed up a little VBA code to do the trick. The variables pos1 and pos2 have been set to the first and last characters of the page being counted. I needed to determine the word count for a Microsoft Word document, omitting all the section titles in the document. I have a macro that correctly counts the number of words in the body of the text, using the command: WordCount = ActiveDocument.Range(Start:=pos1, End:=pos2).ComputeStatistics(wdStatisticWords) This is a simple extension that illustrates a number of concepts when it comes to writing extensions for VS Code. If you’re not seeing the word count in the status bar, it may have been previously disabled.

The following VBA code applied to this document. You can find the word count to the left of the status bar at the bottom of the window. To display extended statistics such as count of characters without spaces, double click the word count in the status bar, or choose Tools - Word Count. The Word Count feature within MS Word indicates that my document contains 12 characters (with spaces). It doesn't matter if a footnote spills over onto the next page, I just the word count including footnotes that are anchored on the page. The easiest way to get the word count of your entire Word document is to simply check the status bar, as the word count is displayed by default. I periodically receive long documents that include footnotes and am trying to find a way using VBA to count the number of words on each page, including footnotes.
