Paste Picture from Excel to Body of Outlook email

Plokimu77

Board Regular
Joined
Oct 1, 2014
Messages
138
Hello forum,

I have combined the code below from different pieces of codes that I have found online.

However, I would like to add the following to the code:

1. Open Outlook Program (if its not opened)
2. Paste the picture that was copied from excel, to the body of the email with the width set at 7.5"
3. Add the emails of a couple of folks
4. Send email out

If it possible can some please help.

Thank you





HTML:
Sub CreateMail()
Application.Calculation = xlManual
With Application
.ScreenUpdating = False
 .EnableEvents = False
 End With
      
 Call Export
 Dim TempFilePath As String
          
 'Create a new Microsoft Outlook session
 Set appOutlook = CreateObject("outlook.application")
 'create a new message
 Set Message = appOutlook.CreateItem(olMailItem)
 With Message
 .Subject = "Count"
     
             .Display
         End With
         With Application
            .ScreenUpdating = True
             .EnableEvents = True
         End With
         Application.Calculation = xlCalculationAutomatic

Sub Export()
Dim rgExp As Range

Set rgExp = Range("A10:N104")
rgExp.CopyPicture Appearance:=xlScreen, Format:=xlScreen
With ActiveSheet.ChartObjects.Add(Left:=rgExp.Left, Top:=rgExp.Top, Width:=rgExp.Width, Height:=rgExp.Height)
.Name = "ChartEXPORT"
.Activate

End With

ActiveChart.Paste
ActiveSheet.ChartObjects("ChartEXPORT").Delete

End Sub

       
        
    End Sub
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,214,982
Messages
6,122,573
Members
449,089
Latest member
Motoracer88

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