hopsinat
hopsinat

Reputation: 103

Is it possible to use the Outlook 'Language' setting programmatically?

I am currently working on an C# Outlook-Add-In for my company which allows the user to plan a video conference in cisco jabber via outlook and i was wondering if it is possibly to somehow programmatically access/use the Outlook-Options "Language" setting in my code?

This is needed in order for the add-in installation to automatically set the language in the App.config based on the users existing outlook settings.

I found this question but i am for sure not allowed (i don't even know if it is possible) to access other users registries: Outlook Version language

Any help is appreciated, thank you.

Upvotes: 0

Views: 519

Answers (1)

Maciej Los
Maciej Los

Reputation: 8591

Accordingly to MSDN documentation, you don't need to read registry, you can use LanguageSettings.LanguageID property to get language id.

Specifies a language setting in a Microsoft Office application. The MsoAppLanguageID enumeration is used with the LanguageSettings member of the Application object to determine the language used for the install language, the user interface language, or the Help language.

MsoAppLanguageID enumeration (Office) Name Value Description

msoLanguageIDExeMode 4 Execution mode language.

msoLanguageIDHelp 3 Help language.

msoLanguageIDInstall 1 Install language.

msoLanguageIDUI 2 User interface language.

msoLanguageIDUIPrevious 5 User interface language used prior to the current user interface language.

In my case it's 1045, which refers to Polish language.

For further details, please see: MsoLanguageID enumeration (Office)

Upvotes: 2

Related Questions