html chart and table in outlook mail

  • Thread starter Thread starter Patrick Molloy
  • Start date Start date
P

Patrick Molloy

I have an Excel workbook that runs some vba which generates about 20 tables
and
charts, saving then charts as .gif files

I need to mail some of these tables with their charts , and show them in
html format in the mail body

I have been able to either show all the charts OR show all the tables, but i
haven't been able to show both

I cannot use the excel envelope method.

any suggestions would be appreciated.
I also asked this question in the Outlook.Programming news group - i hate
cross-posting too - apologies

thanks
Patrick
(e-mail address removed)
 
if it helps, here's my code:

With OutMail
.To = "Molloy, Patrick"

If .To <> "" Then
.Subject = "test charts and tables"
.Attachments.Add Environ$("temp") & "\chart1.gif"
.Attachments.Add Environ$("temp") & "\chart2.gif"

' this by itself shows the two charts in the mail
' html = "<body><div><img src='chart1.gif'/><img
src='chart2.gif'/></div>" ' & Replace(SaveTable, "<body>", "")

'this by utsefl shows the tables in the mail
html = SaveTable ' this is an excel sheet saved
' as html read back as a text file

.HTMLBody = html

.Save
.Display
End If

End With
 
We can't use the envelope method because the spreadsheet is fully
automated...using the mail object works sweetly because we get to see the
email , using .display not .send

While this is available with the envelope method, it stops the code. If we
use send, we don't get a chance to see the mail. Our alternative is to use
envelope an dmail to ourselves, but thats not ideal

best regards
 
Hi Patrick

Sorry I not know a way to display a mail with pictures like you want
Why not send it as a PDF ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top