Hi,
I have a requirement where I need to transfer the emails my Macro creates to a Draft folder in Outlook.
Is this possible?
Here is the Macro code that I use to generate the emails...
I have a requirement where I need to transfer the emails my Macro creates to a Draft folder in Outlook.
Is this possible?
Here is the Macro code that I use to generate the emails...
VBA Code:
Sub jec()
For Each sh In ThisWorkbook.Sheets
With CreateObject("Outlook.Application").CreateItem(0)
.To = Join(Application.Transpose(sh.ListObjects(1).DataBodyRange.Columns(1)), ";")
.CC = Join(Application.Transpose(sh.ListObjects(1).DataBodyRange.Columns(2)), ";")
.Subject = "Training Report - " & Format(DateAdd("d", 1 - Weekday(Now), Now), "dd-MM-yyyy")
.Body = "Dear All" & vbCrLf & vbCrLf & "Please find attached the Weekly Training report." & vbCrLf & vbCrLf & "Kind Regards,"
'.Attachments.Add
.display '.send
End With
Next
End Sub