I'm using the code below to send excel ranges via email, in the body of the email.
Works fine, except it doesn't include any graphs that appear to be in that range. I assume its due to a graph not being in a cell as such?
Is there any way I can get this to include graphs? I have used a workaround by using a jpeg of the range to go in the email body, but its not visually attractive!!
TIA
Works fine, except it doesn't include any graphs that appear to be in that range. I assume its due to a graph not being in a cell as such?
Is there any way I can get this to include graphs? I have used a workaround by using a jpeg of the range to go in the email body, but its not visually attractive!!
TIA
Code:
Sub Emailout()
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set rng = Nothing
Set rng = ActiveSheet.UsedRange
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = ""
.HTMLBody = RangetoHTML(rng)
.Display
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub