Hi,
I am trying to automate e-mail sending of two sets of figures in the same Outlook mail but I am having problems.
I am having Excel save 2 spreadsheets to HTML and then combining them in Outlook using:
It works fine apart from the fact that the colour schemes for each 'table' clash. Headers are grey, negative numbers red and postive green. I can not combine into one spreadsheets as number of columns etc are very different.
Our prefered solution was to insert Excel files as "objects" as you would do using Insert, Object but having read nearly all of the internet it would seem you can only add as attachments?!
Can I get around this at all?
I am trying to automate e-mail sending of two sets of figures in the same Outlook mail but I am having problems.
I am having Excel save 2 spreadsheets to HTML and then combining them in Outlook using:
Code:
'Read first file
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Area.htm")
Set ts = f.OpenAsTextStream(ForReading, tristateUseDefault)
s = ts.ReadAll
ts.Close
'Read second file
Set f = fs.GetFile("C:\Div.htm")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
s = s & ts.ReadAll
myMailItem.HTMLBody = s
ts.Close
myMailItem.Save
It works fine apart from the fact that the colour schemes for each 'table' clash. Headers are grey, negative numbers red and postive green. I can not combine into one spreadsheets as number of columns etc are very different.
Our prefered solution was to insert Excel files as "objects" as you would do using Insert, Object but having read nearly all of the internet it would seem you can only add as attachments?!
Can I get around this at all?