specific language word count

  • Thread starter matty rastafairy
  • Start date
M

matty rastafairy

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
 
D

DeanH

You can use the Find function.
Press Ctrl+F to open Find dialog.
Leave the Find what box empty, check the Highlight all items found in [Main
Document], click More button. Format, Language, select the language you want
to find. OK, Find All button.
Close the Find dialog, and without click in the document, goto the Word
Count (if in 2007 you can have this displayed in the Status bar).
Repeat for the languages you want.

Hope this helps
DeanH
 
D

Doug Robbins - Word MVP

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
 
D

DeanH

Forgot to say, in the Find dialog, check the option for "Whole Words only",
this will discount any paragraph marks on there own.

Hope this helps
DeanH


DeanH said:
You can use the Find function.
Press Ctrl+F to open Find dialog.
Leave the Find what box empty, check the Highlight all items found in [Main
Document], click More button. Format, Language, select the language you want
to find. OK, Find All button.
Close the Find dialog, and without click in the document, goto the Word
Count (if in 2007 you can have this displayed in the Status bar).
Repeat for the languages you want.

Hope this helps
DeanH


matty rastafairy said:
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
 
D

DeanH

Sweet

DeanH


Doug Robbins - Word MVP said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top