I'd like to insert two charts into the body instead of one.. using this code. i've tried duplicating Fname everywhere and creating Fname2
It works for attachments doing it that way. But for some reason i can't get two images in the body..
how could i modify so it would play two different chart images in the body?
Thank you soooooo much!
It works for attachments doing it that way. But for some reason i can't get two images in the body..
how could i modify so it would play two different chart images in the body?
Thank you soooooo much!
Code:
Dim OutApp As Object
Dim OutMail As Object
Dim FName As String
Dim rng As Range
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
'fill in the file path/name of the gif file
FName = Environ$("temp") & "\Theatre_Charts.gif"
'if you hold down the CTRL key when you select the chart
'in 2000-2010 you see the name in the name box(formula bar)
ActiveWorkbook.Worksheets("Theatre-Tracker").ChartObjects("223").Chart.Export _
Filename:=FName, FilterName:="GIF"
On Error Resume Next
With OutMail
.To = Worksheets("Configuration").Range("J10")
.CC = ""
.BCC = ""
.Subject = "Daily Theatre Tracker Summary"
.HTMLBody = "<BODY><img src='" & FName & "'></BODY>"
.Attachments.Add FName
.Display 'or use .Display
End With
On Error GoTo 0
Kill FName
Set OutMail = Nothing
Set OutApp = Nothing