View Full Version : [SOLVED:] How to change the language of the Spell Checker in Outlook with a macro?
Hallo, I wonder if someone can help me. I would like to create a couple of macro to change the language of the Spell Checker in Outlook. I need it because I send many message in different languages and I always perform a spelling check before sending them, but it?s very annoying to have to change the language manually every time.
Unfortunately, the Spell Checker Engine is not an Object in Outlook, nor the language is a property of other objects (as for example LanguageID in MS Word, being a property of Selection, Range and several other objects).
Does someone have a useful tip? Thanks in advance!
Ebrow
07-10-2007, 01:28 PM
Hi.
I am not very good at Outlook, however i have had a little look and I can get the code to tell us what language we are using, however I cannot workout how to change that setting. Maybe this may get others thinking.
MsgBox "Is it US English" & Application.LanguageSettings.LanguagePreferredForEditing(msoLanguageIDEngli shUS)
&
MsgBox "Give me the language ID" & Application.LanguageSettings.LanguageID(msoLanguageIDUI)
Thanks a lot Ebrew,
Unfortunately de properties of LanguageSettings do not affect the Spelling Checker but only the User Interfaces, the Install Language etc.
The LanguagePreferredForEditing property is a predefined register setting, which cannot be changed and is therefore read-only.
As a matter of fact, I think the solution should not be searched in Outlook itself but in de Spelling Checker Engine, which is a kind of "guest-application" in Outlook (and also in Outlook Express). But it seems like there is no way to approach it.
Just for your peace of mind: I posted my question in 4 forums world wide, where thousands of experienced visitors come every day, and your answer was... the only one! I'm afraid, I asked an impossible question.
For the time being I solved the problems with a set of "SendKeys" statements. Not elegant at all, but it works...:(
Charlize
07-11-2007, 02:09 AM
Thanks a lot Ebrew,
Unfortunately de properties of LanguageSettings do not affect the Spelling Checker but only the User Interfaces, the Install Language etc.
The LanguagePreferredForEditing property is a predefined register setting, which cannot be changed and is therefore read-only.
As a matter of fact, I think the solution should not be searched in Outlook itself but in de Spelling Checker Engine, which is a kind of "guest-application" in Outlook (and also in Outlook Express). But it seems like there is no way to approach it.
Just for your peace of mind: I posted my question in 4 forums world wide, where thousands of experienced visitors come every day, and your answer was... the only one! I'm afraid, I asked an impossible question.
For the time being I solved the problems with a set of "SendKeys" statements. Not elegant at all, but it works...:(This will be the 2nd answer. Be sure to be seated because this will give you goosebumps ... After some crawling on internet (I know the codes existed but I have forgotten the site), I found what I was looking for. I will post it here for you as an attachment. Import this into an outlookmodule. More info about language codes can be found here : http://support.microsoft.com/kb/221435
To get this working, just run setlanguagefrenchbelgium or any other sub. Then check out the language the spelling checker is using.
This one is for outlook 2003. Hope you'll like it.
Hallo Charlize,
Thanks a lot-lot-lot!!! The code is fantastic and... it works!
I had some troubles with it in the beginning as I got no results. The macros did run properly, but the language was not changed. Looking at the register, I saw that the right key was changed according to the macro code, but when I started the speller again, he jumped back to the previous language. Finally I discovered the cause: to test the code I was using one of the existing procedures - 'French Belgium' - but that language is not included in the Speller I have installed on my machine!! So the engine just could not find the language stated in the register and jumped automatically back to the last existing value used. After changing the value passed on from the procedures into a languages I do have on my machine, the macros worked as expected. I have now created a small toolbar with all languages I use (6) in a row and I have all choices right before my eyes when I write a new message. Just one click away...:cloud9:
Besides, the code is very useful for other purposes too, as it contains several procedures which allow you to manipulate the registers in different ways.
So thanks again... you are great!
Bye and have a wonderful day :hi:
MVFC
</IMG></IMG>
Je_123
10-02-2007, 11:08 AM
Dear MVFC
Thanks for your posting on this.
I tried to run the macro under Outlook 2003 and it stop in the following line:
End Sub InTypes
informing of a compilation error.
Can you help me out?
Best
je_123
Hi there,
You probably made a mistake while copying the code.
After the Statment End Sub no words or signs are allowed.
Try to delete that "InTypes". It should work.
Bye for now,
MVFC
mmaass
05-19-2008, 10:12 AM
... this is a solution I've been searching for quite some time.
JustinCase
07-23-2008, 12:56 AM
Great! Never want to miss that!
Thanks to the poster!!
Justin
Claudio
10-10-2008, 02:21 AM
I've been looking for this for a long time.
It works perfectly.
Thank you very much.
:clap:
hebru
10-27-2008, 01:21 AM
Thanks have been looking for this also
This will be the 2nd answer. Be sure to be seated because this will give you goosebumps ... After some crawling on internet (I know the codes existed but I have forgotten the site), I found what I was looking for. I will post it here for you as an attachment. Import this into an outlookmodule. More info about language codes can be found here ...
To get this working, just run setlanguagefrenchbelgium or any other sub. Then check out the language the spelling checker is using.
This one is for outlook 2003. Hope you'll like it.
Charlize, I wish I could share an excitment of users that you helped to. Unfortunatelly, I am using Outlook 2007 and the script does not seem to work in it. Do you think you could help me as well?
nigurath
02-04-2009, 09:44 AM
thx
helped
pnunes2004
03-31-2009, 05:43 AM
How do i guet the attachment? can you post the code here?
pnunes2004
04-01-2009, 02:43 AM
Can anyone post here the code provided by Charlize?
Thanks
samparys
04-01-2009, 04:49 AM
Where is the code posted by Charlize ?
pnunes2004
04-01-2009, 11:55 AM
that's also my question...
chrisatwork
10-26-2010, 04:40 AM
I have signed up, updated flash, and switched browsers...still can't find the attachment. Has it been deleted?
Charlize
10-26-2010, 06:42 AM
Attached a zipfile of the whole routine. Import the bas file into a module. Scroll down and read the text in capital letters. I'll post important part here. It is for office 2003 only. If you want 2007 you'll probably need to alter the path.
Charlize
' GET/SET SPELLING LANGUAGE FOR OUTLOOK 2003
'Created by D.Hlad - This code is public domain
Sub GetCurrentSpellingLanguage()
Dim CurrentSpellingLanguage As String
'REMARK BY CHARLIZE : LOOK AT THE PATHSTRING = THE ONE FOR OFFICE 2003
'OTHER OFFICES HAVE PROBABLY A DIFFERENT PATH
CurrentSpellingLanguage = ReadRegistry(HKEY_CURRENT_USER, "Software\Microsoft\Office\11.0\Outlook\Options\Spelling\", "Speller")
End Sub
Sub SetSpellingLanguage(LanguageCode As String)
Dim NewSpellingLanguage As String
NewSpellingLanguage = LanguageCode & "\Normal"
WriteRegistry HKEY_CURRENT_USER, "Software\Microsoft\Office\11.0\Outlook\Options\Spelling\", "Speller", ValString, NewSpellingLanguage
End Sub
Sub SetLanguageDutchBelgium()
'These are the routines you call to change spellinglanguage
'Website holding the codes : http://support.microsoft.com/kb/221435
SetSpellingLanguage ("2067")
End Sub
Sub setlanguageFrenchBelgium()
SetSpellingLanguage ("2060")
End Sub
Sub SetLanguageUK()
SetSpellingLanguage ("2057")
End Sub
Sub SetLanguageUS()
SetSpellingLanguage ("1033")
End Sub
Sub SetLanguageES()
SetSpellingLanguage ("3082")
End Sub
Sub SetLanguageHR()
SetSpellingLanguage ("1050")
End Sub
Sub SetLanguageCAT()
SetSpellingLanguage ("1027")
End Sub
Sub SetLanguagePOR()
SetSpellingLanguage ("2070")
End Sub
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.