![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi,
I've been searching with no success a working example ... Does anybody has a sub or an example to change the spell check by code? I should switch from 1033 and 1040 SpellLang. I just want to add a button on Outlook toolbar that run a sub like this Sub SwitchSpelling() ' this code does not work! If LanguageSettings.LanguagePreferredForEditing = 1033 Then set LanguageSettings.LanguagePreferredForEditing (1033) Else set LanguageSettings.LanguagePreferredForEditing (1040) End If End Sub Ty for any help, Lorenzo |
#2
|
|||
|
|||
![]()
It doesn't work because that property is read-only.
You'll have to use the Win32 API (or Google "VB Registry Class") to change the value of this registry key: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\O utlook\Options\Spelling\SĀ*peller If you try various language selections in the Options dialog and click Apply, you'll see the relevant values get inserted into that key if you refresh regedit. -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Lorenzo" wrote: Hi, I've been searching with no success a working example ... Does anybody has a sub or an example to change the spell check by code? I should switch from 1033 and 1040 SpellLang. I just want to add a button on Outlook toolbar that run a sub like this Sub SwitchSpelling() ' this code does not work! If LanguageSettings.LanguagePreferredForEditing = 1033 Then set LanguageSettings.LanguagePreferredForEditing (1033) Else set LanguageSettings.LanguagePreferredForEditing (1040) End If End Sub Ty for any help, Lorenzo |
#3
|
|||
|
|||
![]()
Ty Eric,
it would be great if you could provide me an example of code to change the value the registry. I've never used the Win32 API in a VBA module :-( Lorenzo Eric wrote: It doesn't work because that property is read-only. You'll have to use the Win32 API (or Google "VB Registry Class") to change the value of this registry key: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\O utlook\Options\Spelling\S*peller If you try various language selections in the Options dialog and click Apply, you'll see the relevant values get inserted into that key if you refresh regedit. -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Lorenzo" wrote: Hi, I've been searching with no success a working example ... Does anybody has a sub or an example to change the spell check by code? I should switch from 1033 and 1040 SpellLang. I just want to add a button on Outlook toolbar that run a sub like this Sub SwitchSpelling() ' this code does not work! If LanguageSettings.LanguagePreferredForEditing = 1033 Then set LanguageSettings.LanguagePreferredForEditing (1033) Else set LanguageSettings.LanguagePreferredForEditing (1040) End If End Sub Ty for any help, Lorenzo |
#4
|
|||
|
|||
![]()
Download this component:
vbAccelerator - Complete Registry control: http://www.vbaccelerator.com/home/VB...ol/article.asp It will make working with the registry a lot easier, without needing to use the Win32 API. -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Lorenzo" wrote: Ty Eric, it would be great if you could provide me an example of code to change the value the registry. I've never used the Win32 API in a VBA module :-( Lorenzo Eric wrote: It doesn't work because that property is read-only. You'll have to use the Win32 API (or Google "VB Registry Class") to change the value of this registry key: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\O utlook\Options\Spelling\SĀ*peller If you try various language selections in the Options dialog and click Apply, you'll see the relevant values get inserted into that key if you refresh regedit. -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Lorenzo" wrote: Hi, I've been searching with no success a working example ... Does anybody has a sub or an example to change the spell check by code? I should switch from 1033 and 1040 SpellLang. I just want to add a button on Outlook toolbar that run a sub like this Sub SwitchSpelling() ' this code does not work! If LanguageSettings.LanguagePreferredForEditing = 1033 Then set LanguageSettings.LanguagePreferredForEditing (1033) Else set LanguageSettings.LanguagePreferredForEditing (1040) End If End Sub Ty for any help, Lorenzo |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Spellchecker language easy change | banjo | Outlook and VBA | 2 | April 21st 06 07:25 AM |
Spellchecker... | me | Outlook Express | 1 | April 10th 06 11:21 PM |
change language | btissam | Outlook - Using Contacts | 1 | March 6th 06 11:40 AM |
Easy question -hard answer | AJR | Outlook - General Queries | 1 | January 31st 06 09:07 PM |
Easy question - hard answer? | John Wright | Outlook - General Queries | 4 | January 31st 06 08:57 PM |