Group:  Microsoft Word ยป microsoft.public.word.vba.addins
Thread: Setting default language in Word

Setting default language in Word
Westman 12/10/2008 2:10:01 AM
Hi all,

I want to know whether is it possible to set the default language by code?
if yes, can someone provide a way to do this?

In my add-in, it will set the other language when I first open MS word. If I
create a new document(without closing the first one), the language is set to
default language again. How do I set the new document to use my prefered
language and not using the default language?

Hope anyone can shed some light about this. THank you.
RE: Setting default language in Word
Jean-Guy Marcil 12/10/2008 7:44:08 PM
"Westman" wrote:

[Quoted Text]
> Hi all,
>
> I want to know whether is it possible to set the default language by code?
> if yes, can someone provide a way to do this?
>
> In my add-in, it will set the other language when I first open MS word. If I
> create a new document(without closing the first one), the language is set to
> default language again. How do I set the new document to use my prefered
> language and not using the default language?
>
> Hope anyone can shed some light about this. THank you.

Like this:
ActiveDocument.Range.LanguageID = wdEnglishUK

Re: Setting default language in Word
"Klaus Linke" <info[ at ]fotosatz-kaufmann.de> 12/11/2008 4:52:53 AM
[Quoted Text]
> "Westman" wrote:
>> In my add-in, it will set the other language when I first open MS word.
>> If I create a new document(without closing the first one), the language
>> is set to default language again. How do I set the new document to use
>> my prefered language and not using the default language?
>>
>> Hope anyone can shed some light about this. THank you.


"Jean-Guy Marcil" wrote:
> Like this:
> ActiveDocument.Range.LanguageID = wdEnglishUK

You've to be aware that when you create a new doc, Word looks in the Windows
setting (regional settings for current keyboard/language), and applies that
language, if necessary as manual formatting.
So it's not some Word setting you can change, and a new doc gets that
language: You'll have to set (or change) the language yourself using
something like Jean-Guy's code.

Klaus

Re: Setting default language in Word
Westman 12/12/2008 1:48:01 AM


"Klaus Linke" wrote:

[Quoted Text]
> > "Westman" wrote:
> >> In my add-in, it will set the other language when I first open MS word.
> >> If I create a new document(without closing the first one), the language
> >> is set to default language again. How do I set the new document to use
> >> my prefered language and not using the default language?
> >>
> >> Hope anyone can shed some light about this. THank you.
>
>
> "Jean-Guy Marcil" wrote:
> > Like this:
> > ActiveDocument.Range.LanguageID = wdEnglishUK
>
> You've to be aware that when you create a new doc, Word looks in the Windows
> setting (regional settings for current keyboard/language), and applies that
> language, if necessary as manual formatting.
> So it's not some Word setting you can change, and a new doc gets that
> language: You'll have to set (or change) the language yourself using
> something like Jean-Guy's code.
>
> Klaus
>
>

Thanks for the reply, jean-guy & klaus.
One question, does this apply to all version of MS Words?

BTW, I tried to manually set my default language to English UK in Word. So,
when I create a new document, the language used is English UK. But in the
regional & language settings, English US is used. So, klaus, what do you mean
that word will look in the Windows setting?

I found out that Word 2007 will use "InstallLanguage" in below key for its
prefered editing language.
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\LanguageResources

Is this useful for setting the default language when Word is opened again?
For older MS Word version(2003 & below), where does Word store its prefered
editing language?
Re: Setting default language in Word
"Klaus Linke" <info[ at ]fotosatz-kaufmann.de> 12/12/2008 7:08:34 AM
[Quoted Text]
> So, klaus, what do you mean that word will look in the Windows setting?

It was like that up to 2003.
From your description it sounds like the behaviour has changed in Word 2007
(where I haven't looked into the matter yet).

So you now know more about it than I do...

:-) Klaus

Home | Search | Terms | Imprint
Newsgroups Reader