API calls and VBA

  • Thread starter Roderick O'Regan
  • Start date
R

Roderick O'Regan

I have a template in Word 2007 (used in Vista) which allows users to
choose their country of location and then display a userform in their
language.
Two of those languages are Turkish and Russian. If that user hasn't
got the appropriate System Locale set then they might see ???? for
letters which can't be identified.
What I would like to do is use an API in my VBA project which would
return the actual System Locale set at that moment on the user's
machine and so advise them to contact their IT department for them
change it to the correct one.
My first investigations into this tells me it could be the GetACP API
but the more I try to find out about it the more I get confused as I
hit dead ends!
Can anyone help with this please?
Roderick
 
K

Karl E. Peterson

Roderick O'Regan brought next idea :
I have a template in Word 2007 (used in Vista) which allows users to
choose their country of location and then display a userform in their
language.
Two of those languages are Turkish and Russian. If that user hasn't
got the appropriate System Locale set then they might see ???? for
letters which can't be identified.
What I would like to do is use an API in my VBA project which would
return the actual System Locale set at that moment on the user's
machine and so advise them to contact their IT department for them
change it to the correct one.
My first investigations into this tells me it could be the GetACP API
but the more I try to find out about it the more I get confused as I
hit dead ends!
Can anyone help with this please?

GetLocaleInfo is probably the one you're after, but
GetSystemDefaultLangID might be interesting too. Snag the class module
I offer at http://vb.mvps.org/samples/Locale and drop it into your
project to see which infos it provides might be of use.
 
R

Roderick O'Regan

Thanks Karl for the information you provided. It was truly "drop in
and run it". Worked a treat! Got what I needed.

I then spent another productive hour reading all the contents in the
site

Thanks again.

Roderick
 
K

Karl E. Peterson

Roderick O'Regan wrote :
Thanks Karl for the information you provided. It was truly "drop in
and run it". Worked a treat! Got what I needed.

Great! That's always my goal. :)
I then spent another productive hour reading all the contents in the
site

Sorry 'bout that... <chuckle>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top