copy WS picture to email body

rickblunt

Well-known Member
Joined
Feb 18, 2008
Messages
609
Office Version
  1. 2019
Platform
  1. Windows
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).


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
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top