P
PJ
I found some code online that I'm trying to modify for my needs. We are
using Outlook & Excel 2003 and I'm trying to have Excel send a message
without any user interaction. I'm trying to get around the "virus warning"
notification and they wont allow us to install any 3rd party apps. Here is a
sample of the code.
With OutMail
.To = "(e-mail address removed)"
.CC = ""
.BCC = ""
.Subject = "Daily Run is Complete"
.Body = strbody
.Send ' virus msg pops up after this line
Application.Wait (Now + TimeValue("0:00:04"))
Application.SendKeys "{TAB}{TAB}", True
' Application.SendKeys "{LEFT}", True
Application.SendKeys "{ENTER}", True
End With
I don't know if I have the correct syntax for the send keys, but I'm trying
to wait 4 seconds for the "Yes" option to become available, then either hit
the left arrow once or the tab key twice before hitting Enter. The problem
is that the VBA code doesn't continue processing anything after the ".Send"
line while that dialog box is up. Is there anyway around this?
using Outlook & Excel 2003 and I'm trying to have Excel send a message
without any user interaction. I'm trying to get around the "virus warning"
notification and they wont allow us to install any 3rd party apps. Here is a
sample of the code.
With OutMail
.To = "(e-mail address removed)"
.CC = ""
.BCC = ""
.Subject = "Daily Run is Complete"
.Body = strbody
.Send ' virus msg pops up after this line
Application.Wait (Now + TimeValue("0:00:04"))
Application.SendKeys "{TAB}{TAB}", True
' Application.SendKeys "{LEFT}", True
Application.SendKeys "{ENTER}", True
End With
I don't know if I have the correct syntax for the send keys, but I'm trying
to wait 4 seconds for the "Yes" option to become available, then either hit
the left arrow once or the tab key twice before hitting Enter. The problem
is that the VBA code doesn't continue processing anything after the ".Send"
line while that dialog box is up. Is there anyway around this?