In this article you will learn how to send a chart as picture using outlook from Excel Macro. There can be two different ways of Sending a chart in email as an image via outlook.
For sending a chart in email, we will first save the chart as an image in temp folder of your system. Send the Chart Picture by either way of mentioned below and then delete it from the temp folder. This logic, i have applied for both the methods mentioned below,


 
1. Sending the Chart Image as an attachment to the mail.

Chart Picture As an Attachment

Chart Image As an Attachment


2. Sending the chart picture embedded to the body of the email in outlook.

Chart Embedded to message of Email

Chart Displayed as body of the Email



Sending the Chart Image as an attachment to the mail.


Sub SendChart_As_Attachment_UsingOutlook()

    Dim olApp As Object
    Dim NewMail As Object
    Dim ChartName As String
    
    Set olApp = CreateObject("Outlook.Application")


    'fill in the file path/name of the gif file
    ChartName = Environ$("temp") & "\Chart1.gif"
           
    ActiveWorkbook.Worksheets("Sheet1").ChartObjects("Chart 1").Chart.Export _
    Filename:=ChartName, FilterName:="GIF"
    '**************************************************************
    'In the above line
    '   Sheet1 : Sheet Name where Chart is placed
    '   Chart 1: Chart Name which you want to sent in email.
    
    '   Note: To get the name of the Chart, select that particular
    '         chart and see in the left side of the formula bar.
    '***************************************************************
   
   ' Create a new mail message item.
    Set NewMail = olApp.CreateItem(0)
    With NewMail
        .Subject = "Please the attached Chart"
        .To = "abc@email.com"
        .Body = "Report is displayed below and chart is attached"
        .Attachments.Add ChartName
        .Send
    End With
    
    'Now delete the chart image from the temp folder
    Kill ChartName

    'Release memory.
    Set olApp = Nothing
    Set NewMail = Nothing

End Sub


Sending the chart picture embedded to the body of the email in outlook.

Below code will not send the Chart as attachment but it will embed the Chart image in the email body as shown in the above image.

Sub SendChart_As_Body_UsingOutlook()

    Dim olApp As Object
    Dim NewMail As Object
    Dim ChartName As String
    
    Set olApp = CreateObject("Outlook.Application")


    'fill in the file path/name of the gif file
    ChartName = Environ$("temp") & "\Chart1.gif"
           
    ActiveWorkbook.Worksheets("Sheet1").ChartObjects("Chart 1").Chart.Export _
    Filename:=ChartName, FilterName:="GIF"
    '**************************************************************
    'In the above line
    '   Sheet1 : Sheet Name where Chart is placed
    '   Chart 1: Chart Name which you want to sent in email.
    
    '   Note: To get the name of the Chart, select that particular
    '         chart and see in the left side of the formula bar.
    '***************************************************************
   
   ' Create a new mail message item.
    Set NewMail = olApp.CreateItem(0)
    With NewMail
        .Subject = "Please the attached Chart"
        .To = "abc@email.com"
        
'       **************************************************
'       You can desing your HTML body for this email.
'       below HTML code will display the image in
'       Body of the email. It will not go in attachment.
'       **************************************************
        .HTMLBody =   "<img src=" & "'" & ChartName & "'> "
        .Send
    End With
    
    'Now delete the chart image from the temp folder
    Kill ChartName

    'Release memory.
    Set olApp = Nothing
    Set NewMail = Nothing

End Sub