I'm relatively new to VBA and have Office 2010. I've got good, working code to save a collection of Pivot Charts as a picture:
And I can set up an email with recipients, subject, etc. The trouble comes when attempting to use Sheets("Status Dashboard").Shapes("DashBoard") as my objNewEmail.HTMLBody. I'd rather not have to save the image as a file somewhere since it's right there on the worksheet but can't figure out how to write the code for it. I've spent a few hours on Google but can't find this solution.
Thanks, in advance, for any help you can provide!
VBA Code:
Sheets("Status Dashboard").Select
Dim s As Shape, rng As Range
Set rng = Range("B200:AL280")
For Each s In ActiveSheet.Shapes
If Intersect(rng, s.TopLeftCell) Is Nothing Then
Else
s.Delete
End If
Next s
Range("B2:AL80").Select
Selection.Copy
Application.GoTo Reference:="R200C2"
ActiveSheet.Pictures.Paste.Name = "DashBoard"
Application.CutCopyMode = False
And I can set up an email with recipients, subject, etc. The trouble comes when attempting to use Sheets("Status Dashboard").Shapes("DashBoard") as my objNewEmail.HTMLBody. I'd rather not have to save the image as a file somewhere since it's right there on the worksheet but can't figure out how to write the code for it. I've spent a few hours on Google but can't find this solution.
Thanks, in advance, for any help you can provide!