Languages Collection Object

Microsoft Word Visual Basic

Multiple objectsLanguages
Language
Dictionary

A collection of Language objects that represent languages used for proofing or formatting in Word.

Using the Languages Collection

Use the Languages property to return the Languages collection. The following example displays the localized name for each language.

For Each la In Languages
    Msgbox la.NameLocal
Next la
		

Use Languages(index) to return a single Language object, where index can be the value of the Name property, the value of the NameLocal property, one of the WdLanguageID constants, or one of the MsoLanguageID constants. (For the list of valid WdLanguageID or MsoLanguageID constants, see the Object Browser in the Visual Basic Editor.)

Remarks

The Count property returns the number of languages for which you can mark text (languages for which proofing tools are available). To check proofing, you must install the appropriate tools for each language you intend to check. You need both a .dll file and an .lex file for each of the following: the thesaurus, spelling checker, grammar checker, and hyphenation tools.

If you mark text as wdNoProofing, Word skips the marked text when running a spelling or grammar check. To mark text for a specified language or for no proofing, use the Set Language command (Tools menu, Language sub menu).