Everything worked great until I upgraded my version of excel. now there is a security feature that prevents me from sending the email. I have looked with no success, if someone could fix the code for me that would be great.
I figure if it can wait five seconds then press TAB TAB ENTER it might work.
any other ideas would be great too
Code
Sub EMail()
extn = "@yahoo.com"
Address = Range("FDS").Text & extn & "; " & Range("SSA").Text & extn
SSA = Range("SSA").Text
FDS = Range("FDS").Text
From = Range("From").Text
andTo = Range("andTo").Text
Altcont = Range("altcont").Text
Dim OutApp As Object
Dim OutMail As Object
Dim strto As String, strcc As String, strbcc As String
Dim strsub As String, strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strto = Address
strcc = ""
strbcc = ""
strsub = "On Call Reminder"
strbody = "string using SSA etc"
With OutMail
.To = strto
.CC = strcc
.BCC = strbcc
.Subject = strsub
.Body = strbody
.Send
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
SendKeys ("{TAB}{TAB}{ENTER}")
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Display More
Thankyou
Justin