{"id":12158,"date":"2012-08-26T08:29:14","date_gmt":"2012-08-26T08:29:14","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/?p=2339"},"modified":"2022-08-12T11:32:41","modified_gmt":"2022-08-12T11:32:41","slug":"mail-chart-as-image-from-outlook-vba-code","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2012\/08\/mail-chart-as-image-from-outlook-vba-code\/","title":{"rendered":"Mail Chart as Image from Outlook – VBA Code"},"content":{"rendered":"
In this article you will learn how to send a chart as picture using outlook from Excel Macro. As you know that in Outlook email, you can send an Image like a normal file attachment. In this case, receiver has to open the attachment to see the content. Since outlook supports HTML formatting of the email body, it is possible to paste the image in the body of the email itself. In this case, your image will be part of the body of the email. To view this receiver does not have to open any file.<\/p>\n
Based on these two options available in Outlook, it is possible to send the Chart Image via Outlook using following two methods:<\/p>\n
We will discuss about both the methods in detail here. Before we jump over to the VBA codes for those methods, let me explain you the trick which involved in achieving this task of sending your graph as a picture in your outlook email.<\/p>\n
Let see some common steps which we are going to follow to send Excel graph as an Image in email.<\/p>\n
For sending the chart as an Image, it is important that we first save the Excel Chart as an Image somewhere in your local computer. Here in this example, I am storing the Image in temporary folder of your windows. You can read this article to know, how to find the special directories path of Windows using Excel VBA. Special directories like Desktop, My Documents, Temp Folders etc..<\/a><\/p>\n Now send the Chart Image by either way from outlook. Read more about how to send emails from Outlook<\/a><\/p>\n At last delete the Chart Image from the temp folder where it was saved it. This logic, I have applied for both the methods mentioned below<\/p>\n <\/p>\n As explained earlier, in this methods, Chart image will be attached like any file attached to the email. You can refer the below image.<\/p>\nStep 2. Send the Image via email<\/h2>\n
Step 3. Now Delete the Image which was saved<\/h2>\n
Click here to read more about Sending emails using Excel VBA >> <\/strong><\/a><\/h2>\n
Method 1: Sending Chart Image as an attachment in the mail<\/h1>\n