I have many charts in excel file, I want to copy the charts to the body of outlook email.
Could you help me?
Thank you so much!
You can convert that excel chart into image and use it in email body,
You can use create a macro Or VBA code by recording macro to convert that chart into an image.
Record a macro by following below steps.
- Select Excel chart.
- Click on copy —> Copy as Picture —> Select Bitmap —> OK (as shown in below shot.)
- Save this macro VBA code in txt file to use in Execute Macro activity.
- By this chart copied in clipboard now you need to convert it into image, for this take assign activity.
Image1 = System.Windows.Forms.Clipboard.GetImage
Image1 —> variable is of type System.Drawing.Image
- Use Save Image activity by using Image1 var and path —> “ImageName.PNG”
Now you can use that image in mail body by using Content ID, Or Base 64 method.
@samir thank you so much, I will try it.
can you use take screenshot activity and save as png or jpg ?
Attach the image to outlook.
Check out this Custom Activity it allows you a direct activity to export the charts as Images.
Let me know if it works.
@Saahil_Chauhan thank you.
@ANSHUL Thank you