Office HTML Filter for 2003? Or clean saveashtml?

B

Bill Dedman

I'm looking for an equivalent for Office HTML Filter for
Excel 2003? Is there one? Built in? A separate product?

I have a macro to save multiple Excel sheets to HTML, but
I can't figure out how to get it to leave out the
Cascading Style Sheets, XML, all the other Office-specific
overhead that bloats the files.

If I can't figure that out, I can clean them up with
Office HTML Filter -- but it works on 2000, won't load on
2003. Argh.

Ideas?

Thanks,

Bill

The macro I have:

' B2996 is the location of the file name and title for the
html file

For Each i In ActiveWorkbook.Sheets
i.Select
Set aa = i.Range("B2996")
Range("A1:F3000").Select
ActiveWorkbook.PublishObjects.Add( _
SourceType:=xlSourceSheet, _
Filename:="C:\Knight\" & aa.Text & ".html", _
Sheet:=i.Name, _
HtmlType:=xlHtmlStatic, _
Title:=aa.Text).Publish
Set aa = Nothing
Next
End Sub
 
B

Bill Dedman

I now see that I want to export to an MHTML file -- which
Excel 2003 does when it automatically republishes.

How do I force that HTML type in my vba macro (below)?

Thanks,

Bill
 
B

Bill Dedman

Figured it out! This forces MHTML, which is much smaller
than regular Office HTML:

For Each i In ActiveWorkbook.Sheets
i.Select
Set aa = i.Range("B2996")
Range("A1:F2995").Select
With ActiveWorkbook.PublishObjects.Add
(xlSourceRange, "C:\" & aa.Text & ".mht", _
"1", "$A$1:$F$2995", xlHtmlStatic, _
Title:="")
.Publish (True)
.AutoRepublish = False
End With
Set aa = Nothing

Next
End Sub
 

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

Top