It looks like that RangeToHTML function is a custom one:
http://www.dicks-clicks.com/excel/sheettohtml.htm
If you need to redo the HTML to properly format any existing URLs or images
in the spreadsheet, that's entirely up to you and nothing in the Outlook
Object Model can help you. However, there is a technique for constructing
the proper HTML that uses inline images:
To add an embedded image to an HTML message in Microsoft Outlook using code:
http://www.outlookcode.com/d/code/htmlimg.htm
--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog:
http://blogs.officezealot.com/legault/
"Alessandro Plasmati" wrote:
Hi all,
I am trying to automate the following procedure, but I have no clue as
how to do it.
Could you please advise?
I have a spreadsheet, and I want to copy the contents of a Range, WITH
formatting and Images, and paste them into an HTML Email on Outlook.
I have tried with the following Sub
Sub Justins_New_Macro()
Dim myOlApp As Object
Dim newItem As Object
Set myOlApp = CreateObject("Outlook.Application")
Set newItem = myOlApp.CreateItem(olMailItem)
newItem.HTMLBody = RangetoHTML(Range("css"))
newItem.Display
End Sub
and the RangetoHTML function....
Everything works, except for the images and the hyperlinks in the
cells...anyone knows why and how to get this sorted?
Thanks a lot
Alessandro