Hi All
i spent all morning trying to find a code example that helps me send email that are in outbox without opening Microsoft Outlook Application.
The following code is in Excel VBA, but it does not send the email, just put it in the outbox. I know that works fine with outlook application running, but that is not the intention.
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "[email protected]"
.Subject = "whatever"
.Attachments.Add ActiveWorkbook.FullName
'.Display
.Send
End With
OutApp.Session.Logoff
Set OutMail = Nothing
Set OutApp = Nothing
hope there is a way thruu this.
Thanks a lot in advance
Cal
Bookmarks