I had already code for attaching the excel workbook. I just need code for attaching an email item into the email.. please assist
Asked
Active
Viewed 30 times
-1
-
What have you tried after you did your research? – braX Feb 26 '20 at 08:45
-
Does this answer your question? [Selecting and copying Outlook email body with a VBA macro](https://stackoverflow.com/questions/27907811/selecting-and-copying-outlook-email-body-with-a-vba-macro) – braX Feb 26 '20 at 09:40
1 Answers
0
Try below code (change the sheet name and range as per your requirements)
Sub Mail()
Dim r As Range
Set r = Worksheets("to_Mail").Range("A1:AD69")
r.Copy
Dim OutApp As Object
Dim outMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set outMail = OutApp.CreateItem(0)
On Error Resume Next
With outMail
.HTMLBody = activeMailMessage.HTMLBody
.To = ""
.CC = ""
.BCC = ""
.Subject = "Report Complete"
Dim wordDoc As Word.document
Set wordDoc = outMail.GetInspector.WordEditor
wordDoc.Range.PasteAndFormat wdChartPicture
outMail.send
End With
End Sub

syedmeesamali
- 9
- 2