Hi, I use the code below to send e-mail with outlook. It works fine but the outlook window pop-up and I need to press the send button. How can I avoid that ? Security settings in outlook ? Some command from VBS ?
Gustaf
Dim myOlApp
Dim myItem
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(0)
myItem.Display
myItem.To = "<E-mail>"
myItem.Subject = "Message for you sir!"
myItem.Body = "Body here."
myItem.Save
AppActivate myItem
SendKeys("%s")
Gustaf
Dim myOlApp
Dim myItem
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(0)
myItem.Display
myItem.To = "<E-mail>"
myItem.Subject = "Message for you sir!"
myItem.Body = "Body here."
myItem.Save
AppActivate myItem
SendKeys("%s")