Ken,
That is what I thought. Pretty much the same as the similar question I
asked about doing this for Outlook XP's Spell Check dialog.
Do you happen to know of any examples of doing something like this? Is it
even possible since the code that would get the handle of the dialog window
would have to live in my custom application, but my application doesn't
actually continue execution until after the CheckSpelling method is called?
For example assuming I am using the code I previously posted, I would have
to somehow setup my application to get the window handle somewhere before I
make the call to objDoc.CheckSpelling(), but how could I get the window
handle if the window hadnt yet been shown??
Thanks!!
-Brian
"Ken Slovak - [MVP - Outlook]" wrote in message
...
As far as I know there's no way to get that from the dialog without doing
hacks using Win32 API calls and subclassing the dialog to intercept mouse
clicks and keyboard presses directed to the dialog. You'd have to see if
those are directed at the location of the Cancel button and if so take
your prompt action then.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Brian McCullough" wrote in message
...
Ken/All,
This seems to work just fine for me and I am using VB.NET 1.1.
Here is my code:
If outlookVersion = OUTLOOK_2007_VERSION Then
Dim objDoc As Word.Document
objDoc = inspector.WordEditor
objDoc.CheckSpelling()
Else
'do spell checking the old way (i.e. for Outlook 2003
and 2002)
End If
I guess there is no way to determine if the user hits the "Cancel" button
and cancels the spell check? I'd like to be able to determine this to
know if I should send the message or not. If the user cancels the spell
check, I'd like to prompt them to see if they want to send the message
anyway, just like Outlook does when you use the regular "Send" button.
Thanks!!
Brian