• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Picture format

Svmaxcel

Member
When I copy a table and a chart in excel and paste it as Bitmap in Ms outlook the image is crisp and clear.
When I paste it as Windows Metafile, it's blurred and not crisp.

If there any way, I can paste data as Bitmap in Outlook via Excel vba
 

Svmaxcel

Member
Great, but how via VBA
However it would be better if its pasted in Outlook via Bitmap directly.
Our organisation has blocked Paint
 

Logit

Active Member
Well ... here is a macro to convert a range to a BMP file :

Code:
Option Explicit

Sub Example1()
Dim i As Integer
Dim intCount As Integer
Dim objPic As Shape
Dim objChart As Chart

'copy the range as an image
Call Sheet1.Range("A1:E12").CopyPicture(xlScreen, xlPicture)

    'remove all previous shapes in sheet2
    intCount = Sheet2.Shapes.Count
        For i = 1 To intCount
            Sheet2.Shapes.Item(1).Delete
        Next i
    'create an empty chart in sheet2
    Sheet2.Shapes.AddChart
    'activate sheet2
    Sheet2.Activate
    'select the shape in sheet2
    Sheet2.Shapes.Item(1).Select
    Set objChart = ActiveChart
    'paste the range into the chart
    objChart.Paste
    'save the chart as a JPEG ... change path as needed
    objChart.Export ("C:\Users\My\Desktop\TestImage.bmp")
   
End Sub
Now you just need to paste the image into Outlook.
 

Svmaxcel

Member
If I share the file with other users, then I have to tell everyone to save the Macro.
That doesn't seems to be a good option.
 
Top