![]() |
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
|
|||
|
|||
![]()
Hello,
Are there any improvements to the Outlook Object Model that allow you to more easily work with Spell Checking....Or at least have Outlook function the same whether you use MailItem.Send() or actually click the Send button? |
#2
|
|||
|
|||
![]()
No changes there that I'm aware of.
-- 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 ... Hello, Are there any improvements to the Outlook Object Model that allow you to more easily work with Spell Checking....Or at least have Outlook function the same whether you use MailItem.Send() or actually click the Send button? |
#3
|
|||
|
|||
![]()
Ken,
Thanks for your response. I have read that in Outlook 2007, Word is used as the email editor, even if you haven't installed Word. If Word is not installed, a subset of it is installed in order to compose email messages. I understand they wanted to get rid of the Outlook email editor so that they (Office Development Team) didn't have to maintain two codebases. When using Word as the email editor for Outlook 2002 (Office XP), when you write code using the MailItem.Send() method, and you have the "Always check spelling before sending" option selected in Outlook, the Word spell checker is launched (it is not if you use Oulook as the email editor). It looks like in Outlook 2007, if you have the same code executing (i.e. MailItem.Send()), the spell checker is NOT launched (eventhough Word is the email editing program - since there is no more "Outlook editor"). My question is, how are we to make sure that spell checking gets run (using the provided spell checking tools - not custom tools) if we are automating the send action of the email ??? In my scenario, I have an addin in which a "Custom Send" button is added to the Standard toolbar (in 2007, it is loaded to the "Add-Ins" tab. This "Custom Send" button modifies the message only slightly, then uses the MailItem.Send method to send the message. When the message is sent, I'd like any normal pre-processing of the message, such as spell checking (if the option is selected) to run. Is there a way in 2007 to get the Send action to occur with all the "normal" send rules? For example, perhaps with the new security model in place, we can now automate the click of the "Send" button on the mail item's inspector? From an end user standpoint, if they have checked that spell checking always be run, then it should run when they initiate a "send" action. And it seems to me that this is pretty common funnctionality being asked for. I have seen similar posts for Outlook 2002 and 2003 posted over the last few years. I understand that someone could be writing code that automates the send action without any user interaction - for exmaple as a windows service, in which case you wouldn't want a spell checking dialog displayed, but in the case where a user is interacting with the message, we should have the ability to make sure all the normal "send" processing occurs. If there is no way in 2007 to do this, is there a way to funnel this up to the Office Development Team to see that they expose this functionality in a later release or service pack? TIA!!! Brian "Ken Slovak - [MVP - Outlook]" wrote in message ... No changes there that I'm aware of. -- 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 ... Hello, Are there any improvements to the Outlook Object Model that allow you to more easily work with Spell Checking....Or at least have Outlook function the same whether you use MailItem.Send() or actually click the Send button? |
#4
|
|||
|
|||
![]()
Actually the subset of Word that's used as the email editor is used whether
or not the full Word 2007 is installed. You do get more functionality if you were to use the Word object model if Word is installed, but the end result is no more Outlook email editor. You can force a spell check using code. The presumption is that when using code to send items that no user interaction is required or wanted, so normally the spell check will not run. However, if you get a handle to the email's Inspector you can get the WordEditor object, which is a Word.Document object. You then can use the Document.CheckSpelling() method to force a spell check before you send the email using code. You have to save the email first before you send it. Here's a quickie VBA sample of how to do that: Sub SpellIt() Dim oMail As Outlook.MailItem Dim oDoc As Word.Document Set oMail = Application.ActiveInspector.CurrentItem Set oDoc = Application.ActiveInspector.WordEditor oMail.Save 'save the item so it is in the Outlook data store oDoc.CheckSpelling oMail.Save 'persist any spelling changes oMail.Send End Sub You can also call the grammar checker the same way. -- 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, Thanks for your response. I have read that in Outlook 2007, Word is used as the email editor, even if you haven't installed Word. If Word is not installed, a subset of it is installed in order to compose email messages. I understand they wanted to get rid of the Outlook email editor so that they (Office Development Team) didn't have to maintain two codebases. When using Word as the email editor for Outlook 2002 (Office XP), when you write code using the MailItem.Send() method, and you have the "Always check spelling before sending" option selected in Outlook, the Word spell checker is launched (it is not if you use Oulook as the email editor). It looks like in Outlook 2007, if you have the same code executing (i.e. MailItem.Send()), the spell checker is NOT launched (eventhough Word is the email editing program - since there is no more "Outlook editor"). My question is, how are we to make sure that spell checking gets run (using the provided spell checking tools - not custom tools) if we are automating the send action of the email ??? In my scenario, I have an addin in which a "Custom Send" button is added to the Standard toolbar (in 2007, it is loaded to the "Add-Ins" tab. This "Custom Send" button modifies the message only slightly, then uses the MailItem.Send method to send the message. When the message is sent, I'd like any normal pre-processing of the message, such as spell checking (if the option is selected) to run. Is there a way in 2007 to get the Send action to occur with all the "normal" send rules? For example, perhaps with the new security model in place, we can now automate the click of the "Send" button on the mail item's inspector? From an end user standpoint, if they have checked that spell checking always be run, then it should run when they initiate a "send" action. And it seems to me that this is pretty common funnctionality being asked for. I have seen similar posts for Outlook 2002 and 2003 posted over the last few years. I understand that someone could be writing code that automates the send action without any user interaction - for exmaple as a windows service, in which case you wouldn't want a spell checking dialog displayed, but in the case where a user is interacting with the message, we should have the ability to make sure all the normal "send" processing occurs. If there is no way in 2007 to do this, is there a way to funnel this up to the Office Development Team to see that they expose this functionality in a later release or service pack? TIA!!! Brian |
#5
|
|||
|
|||
![]()
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 "Ken Slovak - [MVP - Outlook]" wrote in message ... Actually the subset of Word that's used as the email editor is used whether or not the full Word 2007 is installed. You do get more functionality if you were to use the Word object model if Word is installed, but the end result is no more Outlook email editor. You can force a spell check using code. The presumption is that when using code to send items that no user interaction is required or wanted, so normally the spell check will not run. However, if you get a handle to the email's Inspector you can get the WordEditor object, which is a Word.Document object. You then can use the Document.CheckSpelling() method to force a spell check before you send the email using code. You have to save the email first before you send it. Here's a quickie VBA sample of how to do that: Sub SpellIt() Dim oMail As Outlook.MailItem Dim oDoc As Word.Document Set oMail = Application.ActiveInspector.CurrentItem Set oDoc = Application.ActiveInspector.WordEditor oMail.Save 'save the item so it is in the Outlook data store oDoc.CheckSpelling oMail.Save 'persist any spelling changes oMail.Send End Sub You can also call the grammar checker the same way. -- 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, Thanks for your response. I have read that in Outlook 2007, Word is used as the email editor, even if you haven't installed Word. If Word is not installed, a subset of it is installed in order to compose email messages. I understand they wanted to get rid of the Outlook email editor so that they (Office Development Team) didn't have to maintain two codebases. When using Word as the email editor for Outlook 2002 (Office XP), when you write code using the MailItem.Send() method, and you have the "Always check spelling before sending" option selected in Outlook, the Word spell checker is launched (it is not if you use Oulook as the email editor). It looks like in Outlook 2007, if you have the same code executing (i.e. MailItem.Send()), the spell checker is NOT launched (eventhough Word is the email editing program - since there is no more "Outlook editor"). My question is, how are we to make sure that spell checking gets run (using the provided spell checking tools - not custom tools) if we are automating the send action of the email ??? In my scenario, I have an addin in which a "Custom Send" button is added to the Standard toolbar (in 2007, it is loaded to the "Add-Ins" tab. This "Custom Send" button modifies the message only slightly, then uses the MailItem.Send method to send the message. When the message is sent, I'd like any normal pre-processing of the message, such as spell checking (if the option is selected) to run. Is there a way in 2007 to get the Send action to occur with all the "normal" send rules? For example, perhaps with the new security model in place, we can now automate the click of the "Send" button on the mail item's inspector? From an end user standpoint, if they have checked that spell checking always be run, then it should run when they initiate a "send" action. And it seems to me that this is pretty common funnctionality being asked for. I have seen similar posts for Outlook 2002 and 2003 posted over the last few years. I understand that someone could be writing code that automates the send action without any user interaction - for exmaple as a windows service, in which case you wouldn't want a spell checking dialog displayed, but in the case where a user is interacting with the message, we should have the ability to make sure all the normal "send" processing occurs. If there is no way in 2007 to do this, is there a way to funnel this up to the Office Development Team to see that they expose this functionality in a later release or service pack? TIA!!! Brian |
#6
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Spell checking | Terry Bennett | Outlook - General Queries | 0 | March 5th 07 11:45 PM |
Automatic Spell Checking question | Louis | Outlook - Installation | 0 | February 13th 07 08:47 PM |
Spell checking in English and Spanish | Arturo Meneses | Outlook - General Queries | 0 | August 26th 06 03:35 PM |
Unread count incorrect + no spell checking | StainlessSteelRat | Outlook Express | 6 | February 26th 06 01:32 PM |
stop responding spell checking email | Alan Smithee Jr. | Outlook - General Queries | 4 | February 6th 06 06:32 PM |