Unfortunately that's just one of a bunch of settings that are read on startup and then maintained in memory. So the registry settings are only read on startup. About the only thing I can think of would be a real hack involving Win32 API stuff to send a WM_CLOSE message to that dialog when it opens, monitoring for it opening. Depending on version and whether or not WordMail was used there'd probably be different classes for the dialog, that would take some work with Spy++.
Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm
"Graham Mayor" <gmayor@REMOVETHISmvps.org> wrote in message news:OIyg8VLrKHA.3792@TK2MSFTNGP05.phx.gbl...
> In developing an application for Word which sends e-mail messages using > Outlook, I came across an issue that I have not been able to resolve. > Hopefully someone will have a plan :) > > With Outlook's options configured to spell check the message before > sending, each message processed creates the message 'Word finished > checking the selection. Do you want to continue the remainder of the > document' which requires user intervention. Clearly if the option is > switched off in Outlook, the message doesn't occur. As I have no control > over whether users have this option set or not, I would like to switch off > the spell checkling for the duration of the process and thus avoid the > need for user interaction. > > Solutions posted on the web all seem to revolve around setting the > registry entry associated with the option - along the lines of > > Dim myWS As Object > > Dim RegKey As String > > Dim Key As String > > Dim Ver As Variant > > Ver = Application.version > > Key = "HKEY_CURRENT_USER\Software\Microsoft\Office\" _ > > & Ver & "\Outlook\Options\Spelling\Check" > > Set myWS = CreateObject("WScript.Shell") > > 'Read key from registry > > RegKey = myWS.RegRead(Key) > > 'Write new value > > myWS.Regwrite Key, 0 > > 'send message > > 'Write back original value > > myWS.Regwrite Key, RegKey > > > > While this certainly changes the registry, it has no effect on the problem > unless Outlook is closed and restarted. > > > > Does anyone know of a way to suppress this message from vba that does not > involve restarting Outlook? > > > -- > <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > Graham Mayor - Word MVP > > My web site www.gmayor.com > Word MVP web site http://word.mvps.org > <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > > >
13 Feb 2010Turn off Outlook spell checking of messages with vba.Graham Mayor
13 Feb 2010\ Re: Turn off Outlook spell checking of messages with vba.Ken Slovak - [MVP - O...
14 Feb 2010   \ Re: Turn off Outlook spell checking of messages with vba.Graham Mayor
15 Feb 2010      \ Re: Turn off Outlook spell checking of messages with vba.Ken Slovak - [MVP - O...
15 Feb 2010         \ Re: Turn off Outlook spell checking of messages with vba.Graham Mayor
15 Feb 2010            \ Re: Turn off Outlook spell checking of messages with vba.Ken Slovak - [MVP - O...
15 Feb 2010               \ Re: Turn off Outlook spell checking of messages with vba.Graham Mayor
15 Feb 2010                  \ Re: Turn off Outlook spell checking of messages with vba.Ken Slovak - [MVP - O...
16 Feb 2010                     \ Re: Turn off Outlook spell checking of messages with vba.Graham Mayor
16 Feb 2010                        \ Re: Turn off Outlook spell checking of messages with vba.Doug Robbins - Word MVP
16 Feb 2010                           |- Re: Turn off Outlook spell checking of messages with vba.Graham Mayor
16 Feb 2010                           \ Re: Turn off Outlook spell checking of messages with vba.Ken Slovak - [MVP - O...
16 Feb 2010                              \ Re: Turn off Outlook spell checking of messages with vba.Graham Mayor
Contact Us
All times are in (US) Eastern Daylight Time (GMT -4:00)