Hi,
So I am new to VBA and want to edit the macro provided on this site that sends emails.
Is it possible to have a .body = "here is a list" and also include a data range from excel? such as Range("A1:D4")
Ultimately I want the format to look kinda like the below:
'Here is a list:
"Excel input" '
Here is what I have so far:
Sub Email_From_Excel_More_OptionsA3()
Dim emailApplication As Object
Dim emailItem As Object
Set emailApplication = CreateObject("Outlook.Application")
Set emailItem = emailApplication.CreateItem(0)
emailItem.To = Range("B3").Value
'emailItem.CC = "email@test.com"
'emailItem.BCC = "email3@test.com"
emailItem.Subject = Range("C3").Value
emailItem.Body = "Number of your direct reports with late training: " & vbNewLine & "Number of total courses overdue:" & vbNewLine & "List of direct reports with overdue courses:"
'Range("D3:D4").Value
emailItem.Attachments.Add ActiveWorkbook.FullName
'emailItem.Send
emailItem.Display
Set emailItem = Nothing
Set emailApplication = Nothing
End Sub
Please let me know if you guys can offer any advice for .body/email body inputs.
Thank you!