Using Office 365 - I've been searching for hours and my searches seem to come up with everything except for what I have been looking for. I have a piece of code that sends an email to the address in Range F2 (currently my inbox) and works wonderfully but I was curious to see if I could also send it directly to my draft folder? My thought was if I could send it to my draft folder then I would have one last opportunity to review the email before sending it out. Any thoughts and help on this would be greatly appreciated.
Thanks
Sub Mail_Routine()
' This procedure opens Microsoft Outlook
' And based on chose fields sends emails to the email address in cell F2
Application.ScreenUpdating = False
Sheets("Mail_Template").Select
' TurnAutoYesOn '*** Add this before your email has been sent
sMailServer = "mailo2.uhc.com"
sMailFromAddress = "umr-slreporting@umr.com"
Dim OutApp As Object
Dim OutMail As Object
Dim i As Long
On Error Resume Next
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
i = Range("A1").Select
' Select the range of cells on the active worksheet.
Sheets("Mail_Template").Select
ActiveSheet.Range("A5:C25").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message is sent.
With ActiveSheet.MailEnvelope
.Item.To = Range("F2")
.Item.CC = ""
.Item.BCC = ""
.Item.Subject = Range("A2")
.Item.Body = Range("A5")
'.SentOnBehalfOfName = "UMR-StopLossMarketing@umr.com"
.Item.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Sheets("Dashboard").Select
Range("G2").Value = "Sending Dates Completed"
End Sub
Thanks
Sub Mail_Routine()
' This procedure opens Microsoft Outlook
' And based on chose fields sends emails to the email address in cell F2
Application.ScreenUpdating = False
Sheets("Mail_Template").Select
' TurnAutoYesOn '*** Add this before your email has been sent
sMailServer = "mailo2.uhc.com"
sMailFromAddress = "umr-slreporting@umr.com"
Dim OutApp As Object
Dim OutMail As Object
Dim i As Long
On Error Resume Next
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
i = Range("A1").Select
' Select the range of cells on the active worksheet.
Sheets("Mail_Template").Select
ActiveSheet.Range("A5:C25").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message is sent.
With ActiveSheet.MailEnvelope
.Item.To = Range("F2")
.Item.CC = ""
.Item.BCC = ""
.Item.Subject = Range("A2")
.Item.Body = Range("A5")
'.SentOnBehalfOfName = "UMR-StopLossMarketing@umr.com"
.Item.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Sheets("Dashboard").Select
Range("G2").Value = "Sending Dates Completed"
End Sub