2 Methods to Count the Total Words of One Language in a Multi-language Word Document

In today’s article, we would like to present you 2 methods to count the total words of one language in a multi-language Word document.

Once in a while, some of you may have the demand to edit a multi-language Word document. As a result, there will be times you want to do word count for one specific language, but only to find Word unable to perform this task.

Then it is out aim to provide you with 2 useful solutions to address such an issue.

Method 1: Use “Advanced Find” Option

  1. First off, click the upside-down triangle button behind “Find” in “Editing” group under “Home” tab.     Click "Home"->the Button->Click "Advanced Find"
  2. Now in “Find and Replace” dialog box, click “More” button.
  3. And check the “Find whole words only” box.
  4. Then click “Format” button.
  5. Next choose “Language”.Click "Format"->Choose Language
  6. In “Find Language” dialog box, find and select the target language and click “OK”.Select Language->Click "OK"
  7. Now back to “Find and Replace” box, click the “Find In” and choose “Main Document”.Click "Find In"->Choose "Main Document"
  8. Next all English words shall be selected and go to check the word count on the down-left corner of the screen. We can see the number is 93.Check Word Count for English Words

Method 2: Run Word Macro

  1. To start with, click “Developer” tab.
  2. Then click “Visual Basic” to trigger the VBA editor. In case you haven’t had the “Developer” tab enabled yet, press “Alt+ F11” instead.Click "Developer"->Click "Visual Basic"
  3. Next click “Normal” and then click “Insert”.
  4. Choose “Module”.Click "Normal"->Click "Insert"->Click "Module"
  5. And double click on the new module to open the coding space.
  6. Then paste the following codes there:
Sub CountTotalWordsOfOneLanguage()
  Dim objRange As Range
  Dim nWords As Long
 
  ' Initialization
  Set objRange = ActiveDocument.Range
  nWords = 0
 
  ' Find all English words and do word count.
  With objRange.Find
    .LanguageID = wdFrench
    Do While .Execute
      nWords = nWords + objRange.ComputeStatistics(wdStatisticWords)
    Loop
  End With
 
  MsgBox nWords
End Sub
  1. Lastly, click “Run” button.Paste Codes->Click "Run"

There shall be a message box popping up. The number refers to the total words of French texts in this document.A Message Box Showing the Total Number of French Texts

Note:

In code line “.LanguageID = wdFrench”, the “wdFrench” means French language. To customize the codes for more specific use, you can replace the language ID with the exact language you want. And for the more language ID, you can visit: https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2003/aa172988(v=office.11)

Properly Handle Corrupted Word Files

Now and then, Word will shut down or freeze because of all kinds of errors or mistakes. Say, if you fail to back up files on a regular basis, there is a great possibility to lose all the precious data. And the 2 workarounds left is either to utilize the built-in function of Word or obtain a program to repair doc. Given the fact that the former doesn’t seem work so well in most time, it’s advisable to choose a third-party tool.

Author Introduction:

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

3 responses to “2 Methods to Count the Total Words of One Language in a Multi-language Word Document”

  1. Somebody essentially assist to make critically posts I would state. That is the very first time I frequented your website page and up to now? I surprised with the analysis you made to create this particular post amazing. Fantastic task!

  2. Macro doesn’t work as the search range need to be reset after each loop iteration. The comment in the code is also misleading: English does not = French

Leave a Reply

Your email address will not be published. Required fields are marked *