Discussion Locked

Language version of word from VBA

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I need a method to correctly determine the Language of Office (specifically work) that is installed on a system. This will have to be done from a VBA script. I will need the code to make choices based on this information. Any ideas?

6 replies

by glen_mcleod

Here's the VBA code:

Dim lLangId As Long

lLangId = Application.LanguageSettings.LanguageID(msoLanguageIDInstall)

MsgBox Application.Languages(lLangId).Name

What you have in the lLangID variable is the actual LCID, so you could make your decision on that instead of the .Name property.

Glen

by sl-campbell

The following 2 items will return the language name and ID:
MsgBox Application.Languages(Selection.LanguageID).Name
MsgBox Application.Languages(Selection.LanguageID).Id

by tekkalan

The script from answer one works fine. However, in your added comment you provided a constant that I am sure I will find very helpful. Sorry I did not test your script. I am worried about the use of selection. Enjoy the points.

This discussion is closed to new replies.