MarkCBB
Active Member
- Joined
- Apr 12, 2010
- Messages
- 497
Hi there VBA pros,
I am using excel and Outlook 2010, and I am trying to get the below code to paste a chart from excel to the body of an outlook email.
I am using excel and Outlook 2010, and I am trying to get the below code to paste a chart from excel to the body of an outlook email.
Code:
Sub test()
Dim olapp As Object
Dim olmail As Object
Set olapp = CreateObject("Outlook.application")
Set olmail = olapp.createitem(0)
ActiveSheet.ChartObjects("Chart 5").Activate
ActiveChart.ChartArea.Copy
With olmail
.display
.to = "anyone@wer.co.za"
.body = Paste
End With
End Sub