View Single Post
  #7  
Old April 3rd 07, 01:58 PM posted to microsoft.public.outlook.program_addins
Brian McCullough
external usenet poster
 
Posts: 10
Default Outlook 2007 Spell Checking?

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


"Ken Slovak - [MVP - Outlook]" wrote in message
...
You get the UI.

One thing to check and I'm not sure if it's my playing around or a gotcha.

I tested similar code in VSTO and a shared addin using C# and in all cases
and on both computers where I tested it I got "error writing or reading
protected memory". Similar code worked just fine in VBA.

At this time I'm not sure if I didn't fill in all the missing values
correctly in C# for the CheckSpelling() method or if there's really
something funky going on when the call is made from managed code. That's
something I have to look into, but I don't have time to do that for a few
days.

If you get to test it and you're using managed code then let us know how
it goes.

If you're using VB6 it should be OK, that's basically the same as VBA.

--
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
...
OK..I will try that tomorrow (heading out of the office for today), but
one question that maybe you can answer before I have to test for
it...Does the call to CheckSpelling initiate the user interface for the
spell checker, or does this method only call the method that returns a
ProofreadingErrors collection (or similar type of collection) that I
would programatically have to handle?

Thanks!!

-Brian




Ads