LanguageID Property
Applies To
Dictionary object, Find object, Range object, Replacement object, Selection object, Style object, Template object.
Description
Returns or sets the language for the specified object. Read/write Long.
Can be one of the following WdLanguageID constants:
Remarks
For a custom dictionary, you must first set the LanguageSpecific property to True, before specifying the LanguageID. Custom dictionaries that are language specific only look at text formatted for that language.
See Also
Dictionary object, LanguageIDFarEast property, LanguageIDOther property, Languages property, LanguageSpecific property.
Example
This example formats the second paragraph in the active document as French, then adds a new custom dictionary, that will be used on the French text.
ActiveDocument.Paragraphs(2).Range.LanguageId = wdFrench
Set myDictionary = CustomDictionaries.Add(Filename:="French.dic")
With myDictionary
.LanguageSpecific = True
.LanguageId = wdFrench
End With
This example redefines the Title style to use the Spanish proofing tools. The new style description is then displayed in a message box.
ActiveDocument.Styles("Title").LanguageId = wdSpanish
MsgBox ActiveDocument.Styles("Title").Description