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.
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.
- First and foremost, go to the status bar and click “Words” to open the “Word Count” box.
- There you will see all kinds of statistics. Ensure you have checked “Include textboxes, footnotes and endnotes” box.
- Then click “Close”.
- If you can’t find the “Words” command on status bar, right click on there.
- Next check the “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
- Firstly, trigger the “Word Count” box using the way in method 1 and ensure the option box is checked.
- Next press “Alt+ F11” to open VBA editor.
- Then insert a new module in “Normal” project by clicking “Normal” first.
- And click “Insert” next.
- Choose “Module” then.
- 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
- Lastly, click “Run” button.
If there is no text box, footnote or endnote, you will receive a message box as this:
Just click “OK” to proceed. Then you will see another box, listing all 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
Leave a Reply