PDA

View Full Version : [SOLVED:] VBA for detecting Canadian regional language settings



Roderick
09-08-2017, 04:01 AM
I have a client over in Canada who wants me to create one template to satisfy both Canadian English users as well as Canadian French users.

They are using Word 2016 and Windows 10. Funnily enough, so am I.

Now, I can create templates which read the Country and Format settings from the Region settings of the Control Panel (provided they are set correctly by the user!). I've done it for a bilingual English/Spanish template. However, the problem arises when working with Canada - the country is the same, but the languages can be different.

Is there anywhere in the Region area of the Control Panel settings that users can set their language, say Canadian(English) or Canadian (French) and VBA could read these settings and apply appropriate textual changes to the document, please?

What VBA would I have to employ to achieve this?

Could someone suggest ideas, please?

Thanks.

macropod
09-08-2017, 05:36 PM
Perhaps:
MsgBox Application.International(wdProductLanguageID)
which returns the language version of Word. You can find the languageID list at, for example: http://msdn.microsoft.com/en-us/library/bb213877(v=office.12).aspx

Roderick
09-09-2017, 03:15 AM
Thanks, Paul for a great idea. Following up on your link, above, also showed a wdLanguageID which can differentiate between the two Canadian common languages.

Here's something for me to try!

I need to communicate with the IT guys in Canada, though, to fing out whether the users in Quebec are using the French version of Word and the English version in Calgary. Having worked with them now for a number of years I wouldn't be surprised if they are using a completely different language version but still wanting to use either English or French! They're great people though...

However, thanks for the tip.

Regards

Roderick