View Single Post
  #5  
Old May 6th, 2010, 12:07 PM posted to microsoft.public.word.docmanagement
DeanH
external usenet poster
 
Posts: 1,783
Default specific language word count

Sweet

DeanH


"Doug Robbins - Word MVP" wrote:

Use a macro containing the following code:

Dim English As Long, Spanish As Long, Arabic As Long
Dim aword As Range
English = 0
Spanish = 0
Arabic = 0
With ActiveDocument
For Each aword In .Words
If aword.LanguageID = wdEnglishAUS Then
English = English + 1
ElseIf aword.LanguageID = wdArabic Then
Arabic = Arabic + 1
ElseIf aword.LanguageID = wdSpanish Then
Spanish = Spanish + 1
End If
Next aword
End With
MsgBox "There are " & English & " English words, " & Arabic & " Arabic words
and " & Spanish & " Spanish words."

You will need to make sure that you select the correct version of English
and possibly Spanish.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"matty rastafairy" wrote in
message ...
Hello I have a word document with text in Spanish, English and Arabic. Is
there a way to count the number of words in one specific language? (i.e.
total word count is 2652 words but how many are spanish, how many english
and
how many Arabic?)

Thanks for your time