LanguageID in a Word Document (VB)
ManuelR
1
Reputation point
I have a Microsoft.Office.Interop.Word.Document object, this object has a function named Range, and with that Range I can get the LanguageID of the selected text in the Range.
I have this:
Dim objDoc As Microsoft.Office.Interop.Word.Document = Document
Select Case objDoc.Range.LanguageID
Case WdLanguageID.wdSpanish,
WdLanguageID.wdSpanishModernSort
defaultLang = "es"
Case WdLanguageID.wdCatalan
defaultLang = "ca"
Case WdLanguageID.wdBasque
defaultLang = "eu"
Case WdLanguageID.wdPortuguese
defaultLang = "pt"
Case WdLanguageID.wdEnglishUK, WdLanguageID.wdEnglishUS
defaultLang = "en"
Case Else
defaultLang = "es"
End Select
How does the LanguageID work? where does it come from? Can I change it? Can I access to it outside the code? (using ms word)
Thank you in advance