spell checker turned off in code

S

Sara Bradner

I am creating a test in Access that all users must take.
It calculates their score and sends me an e-mail with
their score automatically. I do not want them to be able
to stop the e-mail and it happens so fast they do not even
notice. The problem is I want to include some text like
file paths that will hang up the spell checker. I want to
disable the spell checker, send the e-mail, and then
enable the spell checker. I can get the code to the tab
with the spelling options but I can not figure out how to
deselect those top 2 spelling options of "Always suggest
replacements for misspelled words" and "Always check
spelling before sending". How can I deselect a check box
in code? I have included the code below.

Private Sub sara_Click()

Dim dbs As Object
Dim testdb As Database
Dim who As String ' the user's log on ID
Dim appout As String ' Outlook

Set testdb = CurrentDb
who = Environ("username") ' not being used yet

' starts a copy of Outlook so title will be the same for
all users
appout = Shell("C:\Program Files\Microsoft
Office\Office\Outlook.exe")


' moves cursor control over to Outlook so can e-mail
AppActivate "Inbox - Microsoft Outlook"


' disable spell checker (NOT DONE YET)
'SendKeys "{F10}"
'SendKeys "T"
'SendKeys "O"
'SendKeys "^{tab}"
'SendKeys "^{tab}"
'SendKeys "^{tab}" ' after I get here I can not get it
to deselect the top 2 checkboxes for spelling


' start creating the e-mail
SendKeys "{F10}"
SendKeys "{down}"
SendKeys "{Right}"
SendKeys "{Enter}"

' type in the name the e-mail is sent to
SendKeys "Sara Bradner"

' type in the subject line
SendKeys "{tab}"
SendKeys "{tab}"
SendKeys "This is the subject line"


' type in the body of the message
SendKeys "{tab}"
SendKeys "This is the body of the message"


'send the e-mail, if any mispellings it will ask if you
want to ignore them
SendKeys "{F10}"
SendKeys "{down}"
SendKeys "{down}"
SendKeys "{enter}"

' enable spell check (NOT DONE YET)
' ????


' closes the Outlook that you opened
SendKeys "{F10}"
SendKeys "F"
SendKeys "X"


End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top