3 Ways to Get Word Count Statistics Related to Text Boxes, Footnotes & Endnotes in Your Document

In today’s article, there are 3 quick ways to get word count statistics related to text boxes, footnotes and endnotes in your document.

It’s not hard to get the total count of words in a document. But if you want to get the number of words of different kinds of texts, then more operations will be required. Following are 3 methods. Read on to see what you can use. Get Word Count Statistics Related to Text Boxes, Footnotes & Endnotes in Your Document

Method 1: Count Words Including Texts from Text Boxes, Footnotes and Endnotes

By default, Word counts all words appear on the document, including texts in text boxes and words from footnotes and endnotes as well.

  1. First and foremost, go to the status bar and click “Words” to open the “Word Count” box.
  2. There you will see all kinds of statistics. Ensure you have checked “Include textboxes, footnotes and endnotes” box.
  3. Then click “Close”.Click Words on Status Bar->Uncheck "Include textboxes, footnotes and endnotes" Box->Click "Close"
  4. If you can’t find the “Words” command on status bar, right click on there.
  5. Next check the “Word Count”.Right click on Status Bar->Check "Word Count"

Method 2: Exclude Texts from Text Boxes, Footnotes and Endnotes from Word Count

This is opposite to method 1. So you just need to uncheck the “Include textboxes, footnotes and endnotes” box.

Method 3: Run Word Macro to Get Separate Count of Words from Text Boxes, Footnotes and Endnotes

  1. Firstly, trigger the “Word Count” box using the way in method 1 and ensure the option box is checked.
  2. Next press “Alt+ F11” to open VBA editor.
  3. Then insert a new module in “Normal” project by clicking “Normal” first.
  4. And click “Insert” next.
  5. Choose “Module” then.Click "Normal"->Click "Insert"->Click "Module"
  6. Double click the module to open the coding area and paste the following codes there:
Sub SeparateCountNumberOfTextboxFootnoteEndnote()
  Dim lTextboxWords As Long
  Dim lTextboxChars As Long
  Dim lDocumntWords As Long
  Dim lDocumntChars As Long
  Dim objTextboxShape As Shape
  Dim objTemp As Dialog
  Dim bDone As Boolean
  Dim objRange As Range
  Dim lFootnoteWords As Long
  Dim lFootnoteChars As Long
  Dim lEndnoteWords As Long
  Dim lEndnoteChars As Long
 
  Application.ScreenUpdating = False

 Do
   bDone = True
   For Each objTextboxShape In ActiveDocument.Shapes
     If objTextboxShape.Type = msoGroup Then
       objTextboxShape.Ungroup
       bDone = False
     End If
   Next objTextboxShape
 Loop Until bDone

 '  Count the words and characters in the whole document.
 Selection.HomeKey Unit:=wdStory
 Set objTemp = Dialogs(wdDialogToolsWordCount)
   objTemp.Update
   objTemp.Execute
   lDocumntWords = objTemp.Words
   lDocumntChars = objTemp.Characters
 
 With ActiveDocument
 '  Count the words and characters in all textboxes.
   lTextboxWords = 0
   lTextboxChars = 0
   If ActiveDocument.Shapes.Count > 0 Then
     For Each objTextboxShape In .Shapes
       objTextboxShape.Select
       objTemp.Execute
       lTextboxWords = lTextboxWords + objTemp.Words
       lTextboxChars = lTextboxChars + objTemp.Characters
     Next objTextboxShape
   Else
     MsgBox ("There is no text box in this document")
   End If

   '  Count the words and characters in all footnotes.
   lFootnoteWords = 0
   lFootnoteChars = 0
   If ActiveDocument.Footnotes.Count > 0 Then
     For Each objRange In .StoryRanges
       If objRange.StoryType = wdFootnotesStory Then
         objRange.Select
         objTemp.Execute
         lFootnoteWords = lFootnoteWords + objTemp.Words
         lFootnoteChars = lFootnoteChars + objTemp.Characters
       End If
     Next objRange
   Else
     MsgBox ("There is no footnote in this document")
   End If

   '  Count the words and characters in all endnotes. 
   lEndnoteWords = 0
   lEndnoteChars = 0
   If ActiveDocument.Endnotes.Count > 0 Then
     For Each objRange In .StoryRanges
       If objRange.StoryType = wdEndnotesStory Then
         objRange.Select
         objTemp.Execute
         lEndnoteWords = lEndnoteWords + objTemp.Words
         lEndnoteChars = lEndnoteChars + objTemp.Characters
       End If
     Next objRange
   Else
     MsgBox ("There is no Endnote in this document")
   End If
 End With
 
 Application.ScreenUpdating = True

 MsgBox (" In this document there are totally" & vbCr _
   & Str(lDocumntWords) & " word(s) and" & Str(lDocumntChars) & " characters" & vbCr & vbCr _
   & "Including:" & vbCr _
   & Str(ActiveDocument.Shapes.Count) & " textboxes contain(s)" & vbCr _
   & Str(lTextboxWords) & " word(s)," & Str(lTextboxChars) & " characters" & vbCr & vbCr _
   & Str(ActiveDocument.Footnotes.Count) & " footnotes contain(s)" & vbCr _
   & Str(lFootnoteWords) & " word(s)," & Str(lFootnoteChars) & " characters" & vbCr & vbCr _
   & Str(ActiveDocument.Endnotes.Count) & " Endnotes contain(s)" & vbCr _
   & Str(lEndnoteWords) & " word(s)," & Str(lEndnoteChars) & " characters")
End Sub
  1. Lastly, click “Run” button.Paste codes->Click "Run"

If there is no text box, footnote or endnote, you will receive a message box as this:Message box indicating no endnote in the document

Just click “OK” to proceed. Then you will see another box, listing all details of word count.Details of word count

Get a Recovering Tool

Since Word can collapse all of a sudden, it’s advisable to obtain an advanced repairing product to do the fixing job. Such a tool can be a great saver for corrupt Word. Therefore, seize time to get one as soon as possible.

Author Introduction:

Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including fix xls and pdf repair software products. For more information visit www.datanumen.com

Comments are closed.