Disable spell check in outgoing email

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I'm using a Excel macro that creates an email notification to different
people in an column. Then I have it send using

..Display
Application.SendKeys "%s" 'This feature can't be test run.
Application.Wait Time + TimeValue("00:00:01")

However, the program hangs up if the spell checker gets activated due to a
name. The rest of the body of the message is fine. I need to know how to set
it to not perform the spell check when I send the message.
 
I'm using Outlook, 2002

If the previous question is unclear, I'm asking for the VBA coding needed to
bypass the spell checker when I send an email.
 
You can also, in Outlook, go to Tools> Options>Spelling Tab and uncheck
"Always check spelling before sending"
 
Hm. Looks good, but its not working for me. Where in the coding would this
go? As for unchecking the spell check box, that won't work as this program
operates from the letter screen only, and on different computers. If I set it
to "uncheck" that box everytime, then if it runs on a computer where intial
value of box is unchecked, it will actually check it. =( I've posted the part
of my code below, if someone could say where "olMailObject.SpellingChecked =
True" needs to go, would be most helpful. The main structure of the coding is
based off of Ron de Bruin's site.

For Each cell In Sheets("Sheet2").Range("c2:c" &
WorksheetFunction.CountA(Worksheets("Sheet2").Range("a:a")))
If LCase(cell.Offset(0, 3).Value) = "yes" _
And LCase(cell.Offset(0, 4).Value) <> "send" Then 'first check
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
olmailobject.spellingchecked = True '<==== Where I have it
now
.To = cell.Value
.Subject = "CAR " & cell.Offset(0, -2).Value & " needs
updated"
.Body = Body message goes here
.Display

Application.SendKeys "%p"
Application.SendKeys "h"
Application.SendKeys "{ENTER}" 'Sets message priority to "high"
Application.SendKeys "%s"
Application.Wait Time + TimeValue("00:00:01")

End With
Set OutMail = Nothing
cell.Offset(0, 4).Value = "send"
End If
 
Back
Top