Discussion:
Setting default language in Word
(too old to reply)
Westman
2008-12-10 02:10:01 UTC
Permalink
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.
Jean-Guy Marcil
2008-12-10 19:44:08 UTC
Permalink
Post by Westman
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
Klaus Linke
2008-12-11 04:52:53 UTC
Permalink
Post by Jean-Guy Marcil
Post by Westman
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.
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
Westman
2008-12-12 01:48:01 UTC
Permalink
Post by Klaus Linke
Post by Jean-Guy Marcil
Post by Westman
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.
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?
Klaus Linke
2008-12-12 07:08:34 UTC
Permalink
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

Loading...