June 1, 2018
I want to send send an email at the specific time of a day in Excel, if the workbook is closed, the macro still runs to pop up an email so I can click "send" after making some changes.
please see the attached file containing the code I found online, unfortunately it is not working at set time.
Can anyone shed some light and help?
many thanks!
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
June 1, 2018
I have updated the code as you suggested,
Sub SendEmail()
Set olApp = CreateObject("Outlook.application")
Set objMail = olApp.CreateItem(olMailItem)
With objMail
.Display
.To = "scfkth@gmail.com"
.Subject = "reminder"
'HTML for fun
'.BodyFormat = olFormatHTML
.HTMLBody = "<HTML><H2>Please review your request and submit again.</BODY></HTML>"
.Send
End With
End Sub
But it doesn't generate an email at set time. and when I open the file and run macro, the email was sent straightaway. I am hoping to have an email pop up first so I can modify the body message before sending it. Any suggestion?
Thanks again!
1 Guest(s)