Hello, I am trying to email a range of cells in a WS as a picture in the body of an outlook email. So I used a snippet of code to copy my range and then paste it as a picture back on to the worksheet. In this case I am pasting it on to sheet "Coding" and it is called "Picture 1". I tried to tweak my email code for Picture 1 and it did not work, got the 1004 error. Is this just a syntax error or is this simply something that just cannot be done? I appreciate all your input - thanks
(Since I was pasting the picture to E1 I tried that as well but what I got was the whole WS copied into the email instead of just Picture 1).
(Since I was pasting the picture to E1 I tried that as well but what I got was the whole WS copied into the email instead of just Picture 1).
VBA Code:
Sub SendReportEmail()
' Select the range of cells on the active worksheet.
Worksheets("Coding").Activate
ActiveSheet.Range("Picture 1").Select 'I usually have my WS range here instead of the "Picture 1".
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "Here is the Maintenance PM Report"
.Item.To = Range("Coding!A4").Text
.Item.Subject = "Maintenance PM Report"
.Item.Display
End With
End Sub