Share via


_Application3.LanguageSettings property

Gets a reference to the Microsoft Office LanguageSettings.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
ReadOnly Property LanguageSettings As Object
    Get
'Usage
Dim instance As _Application3
Dim value As Object

value = instance.LanguageSettings
Object LanguageSettings { get; }

Property value

Type: System.Object

Implements

_Application2.LanguageSettings
_Application.LanguageSettings

Remarks

After you establish a reference to the LanguageSettings object returned by the LanguageSettings property, you can access all the properties and methods of the object.

The LanguageSettings object returned by the InfoPath LanguageSettings property is implemented in the Microsoft.Office.Core namespace. The Microsoft.Office.Core.LanguageSettings object provides information about the Microsoft Office language settings that are in use on the user's computer.

To access the members of Microsoft.Office.Core namespace, you must first add a reference to the Microsoft Office 14.0 Object Library on the COM tab of the Add Reference dialog box in Visual Studio 2012.

To use the LanguageSettings property to access the Microsoft.Office.Core.LanguageSettings object, you must cast the object returned by InfoPath LanguageSettings property to the Office LanguageSettings type as shown in the code example.

Important

This member can be accessed only by forms opened from a form template that has been configured to run with full trust using the Security and Trust category of the Form Options dialog box. This member requires full trust for the immediate caller and cannot be used by partially trusted code. For more information, see "Using Libraries from Partially Trusted Code" on MSDN.

Examples

The following example uses the LanguageID property of the LanguageSettings object to return the LCID value (a four-digit number) for the language that is currently being used for the Office user interface.

This example requires a using or Imports directive for the Microsoft.Office.Core namespace in the declarations section of the form code module.

LanguageSettings langSettings = 
   (LanguageSettings) thisApplication.LanguageSettings;
int lcid = 
   langSettings.get_LanguageID(MsoAppLanguageID.msoLanguageIDUI);
Dim langSettings As LanguageSettings  = 
   DirectCast(thisApplication.LanguageSettings, LanguageSettings)
Dim lcid As Integer  = 
   langSettings.LanguageID(MsoAppLanguageID.msoLanguageIDUI)

See also

Reference

_Application3 interface

_Application3 members

LanguageSettings overload

Microsoft.Office.Interop.InfoPath.SemiTrust namespace