OK I'll look at that - at the moment (for Office 2007) I am simply reading
the registry entry (where it exists), informing the user and disabling the
function.
Interestingly the issue does not arise when working with the same documents
in Office 2003 with Word as e-mail editor (but then I suppose you have the
issue there of not being able to select Word as e-mail editor from vba - as
one door closes another opens).
Whilst on the subject of Office 2003 the basic code segment (below) that
works in Office 2007 does not work for me in Word 2003. I cannot decide
whether this is because of a problem with the Office 2003 installation, or
whether simply it doesn't work in Office 2003. It works with Word 2003 and
Outlook 2007 and Word 2007 and Outlook 2007, but not Word 2003 and Outlook
2003 - and if it is my installation at fault, I can't put my finger on where
:(
Set oItem = oOutlookApp.CreateItem(olMailItem)
Set objDoc = oItem.GetInspector.WordEditor
Set objSel = objDoc.Windows(1).Selection
With oItem
.To = strEMail
.Subject = "Subject"
Selection.Copy
.Display
objSel.Paste
End With
'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
Word MVP web site
http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
"Ken Slovak - [MVP - Outlook]" <kenslovak@mvps.org> wrote in message
news:uDGZ$YkrKHA.4220@TK2MSFTNGP05.phx.gbl...
> One other possibility, which probably would only work for WordMail 2003 or
> earlier would be to try using Word code to disable spell checking in the
> document. You can get at Word from Inspector.WordEditor, which is actually
> Word.Document.
>
> Getting WordEditor is restricted in the object model, especially for
> outside code, but there is alternative code out there to get WordEditor
> using Win32 API calls and callbacks, bypassing the Outlook object model.
> I've posted it in the past in VB6, let me know if you need me to dig it
> out.
>
> --
> 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:uMMZtzTrKHA.4752@TK2MSFTNGP04.phx.gbl...
>> Thanks Ken - I had seen an earlier reference from you which essentially
>> said the same thing. In this instance the problem arises because when the
>> message is created from vba, part of it is selected at the time it is
>> sent. It seems probable that all that needs to be done is to move the
>> selection point to the start of the message before issuing the send
>> command for the prompt to go away. As there won't be any spelling errors
>> in the message (being part of a mail merge where that will already have
>> been addressed) the spell check will not prompt for corrections and
>> without the selection being selected, it won't attempt to spell check in
>> two parts. :)
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site
www.gmayor.com
>> Word MVP web site
http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>