I am trying to paste an excel shart in the body of an outlook message.
I already managed to do this through exporting the chart and then
importing, but the chart loses a lot of quality so I am trying to find
a way to paste the chart through the clipboard.
the only thing missing in my code would be the procedure to paste
chart that is already on the clipboard. here's what I have:
Dim theApp, theNameSpace,
theMailItem, myAttachment, Msg
'create a new Outlook Application Object,
'direct it to the proper NameSpace,
'create a new Mail Item and set the attachments collection
Set theApp = CreateObject("Outlook.Application")
Set theNameSpace = theApp.GetNamespace("MAPI")
Set theMailItem = theApp.CreateItem(0)
Set myAttachment = theMailItem.Attachments
' campo mensagem '
ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen,
'add recipients to MailItem
theMailItem.subject = "Anything"
theMailItem.Body = Msg
I found the code below on this same newsgroup that supposedly would
the job, but it is not working. Does anyone know why?
Set tmpBody =