Wondered if anyone can help. I have built a macro that emails people an attached file that I need to send out each day. I also need to copy some cells (A38:A68) into the body of the text (in between 'Please find attached' and 'kind regards') but can't get it to work. Below is my macro so far - can anybody help?
Thanks
Sub Mail_workbook_Outlook()
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
strbody = "Dear All," & vbNewLine & vbNewLine & _
"Please find attached." & vbNewLine & vbNewLine & _
"Kind regards" & vbNewLine & vbNewLine & _
"Test" & vbNewLine & vbNewLine
With OutMail
.To = "test@test.com"
.CC = "test@test.com"
.BCC = ""
.Subject = "Report"
.Attachments.Add ("C:\Documents and Settings\Test\Desktop\Report.pdf")
.Body = strbody
.Display
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Bookmarks