Quote:
Originally Posted by Jeskit
HI,
I have been asked to create a macro in Outlook which checks an email before its sent. This macro will check the address, subject, attachements and Spelling. However Currently when it gets to checking the spelling it just asks if the user has spell checked the body of the text, if the user selects no then it display a mesage saying please select ok to close the macro and spell check the email.
However i was wondering if it is possible to instead of the displaying the second message "please select ok to close the macro and spell check the email" to have a message which said "please select ok to run a spell check on the body of the text". However I can not seem to work out if it is possible to have a VBA macro in Outlook spell check the body of the text.
Does anyone know if it is possible to start a spell check in outlook VBA?
Thanks,
Jeskit
|
You'll want to use something like...
Code:
Sub TestifBlankandEmail ()
'A1 : D10 is the range you want to check if blank
If [AND (ISBLANK (A1 : D10))] Then
'This message that pops up if the range is blank
MsgBox "Please complete all data entries."
Else
'If it isn't blank, then send the email as an attachment to recipient, with subject of TPS Report
ActiveWorkbook.SendMail _
Recipients: ="Email Address", _
Subject: ="TPS Report"
End If
End Sub
Hope this helps,