View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_4_] Dick Kusleika[_4_] is offline
external usenet poster
 
Posts: 595
Default Jim Rech's SheetToHTML function doesn't work in Excel 2007?

On Thu, 24 Jul 2008 11:13:01 -0700, JeffreyW
wrote:

After searching around the web, I haven’t found any solution that allows me
to use Jim Rech's SheetToHTML function discussed at (amongst other places):

http://www.dicks-clicks.com/excel/ol...ingExceltoHTML

… to generate an Outlook email from Excel 2007. The code I used, adapted
from these suggestions, works fine in Excel 2003 (even when output is to
Outlook 2007), but when run from Excel 2007, it produces an email with the
message "This page uses frames, but your browser doesn't support them".

The code I use copies the contents of a sheet in an Add-in file, saves it to
a temporary HTML file and generates that content within the body of the
Outlook email (at least it does from Excel 2003 – in Excel 2007, I get the
above message). I compared the HTML output from both 2007 and 2003. The
HTML was drastically different between the two versions with 364 lines of
code produced in 2007 vs. 164 in 2003. While I am not sure that is relevant,
I suspect the way Excel 2007 generates its HTML is a factor here.


From what I understand, Excel beefed up it's html output to include frames,
while Outlook switched it's html rendering engine from IE to Word. Word
doesn't support frames and that's where the error lies.

If you don't need perfect fidelity, you might try David McRitchie's html
converter code:

http://www.mvps.org/dmcritchie/excel/xl2html.htm
--
Dick Kusleika
Microsoft MVP-Excel
http://www.dailydoseofexcel.com