Share via


Application.LanguageSettings Property

Visio Automation Reference

Returns a reference to the Microsoft Office (MSO) LanguageSettings interface. Read-only.

Version Information
 Version Added:  Visio 2007

Syntax

expression.LanguageSettings

expression   A variable that represents an Application object.

Return Value
Object

Remarks

After you use the LanguageSettings property to get a reference to the MSO LanguageSettings interface, you can use methods of that interface to get the locale identifier (LCID) for the language used when Office was installed, the user interface (UI) language, and the language for Help, as well as the current setting for the preferred language for editing in the UI, as shown in the following example.

However, you cannot use the LanguageSettings interface to change language settings: you can change language settings only in the Microsoft Office Language Settings 2007 dialog box. (Click Start, point to All Programs, point to Microsoft Office, point to Microsoft Office Tools, and then click Microsoft Office 2007 Language Settings.

Example

The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the LanguageSettings property to get an MSO LanguageSettings interface, and then to use two of its methods to get the ID of the language set for the UI, and to test whether US English is set as the preferred language for editing.

Visual Basic for Applications
  Public Sub LanguageSettings_Example()
Dim msoLanguageSettings As LanguageSettings

Set msoLanguageSettings = Application.LanguageSettings
Debug.Print msoLanguageSettings.LanguageID(msoLanguageIDUI)
Debug.Print msoLanguageSettings.LanguagePreferredForEditing(msoLanguageIDEnglishUS)

End Sub

See Also