Hi,
I am trying to send an email at 10:30 am every morning to the same address each day. I was wondering if there is a way to do this. Right now I have the following in excel;
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Dim wb As Workbook
Application.ScreenUpdating = False
Sheets(Array("Buys", "Sells")).Copy
Set wb = ActiveWorkbook
With wb
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = "me@home.com"
.CC = ""
.BCC = ""
.Subject = "Account Info"
.Body = " "
.Attachments.Add
.Send
End With
.Close False
End With
Application.ScreenUpdating = True
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
What else do I need to add, and can I program a macro in Outlook?
Thanks.
I am trying to send an email at 10:30 am every morning to the same address each day. I was wondering if there is a way to do this. Right now I have the following in excel;
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Dim wb As Workbook
Application.ScreenUpdating = False
Sheets(Array("Buys", "Sells")).Copy
Set wb = ActiveWorkbook
With wb
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = "me@home.com"
.CC = ""
.BCC = ""
.Subject = "Account Info"
.Body = " "
.Attachments.Add
.Send
End With
.Close False
End With
Application.ScreenUpdating = True
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
What else do I need to add, and can I program a macro in Outlook?
Thanks.