export to html

A

avi

Hello,

My Vba program copy selected objects from Excel and create a very
simple PDF file. All the objects are pictures format

I wonder if there is a way to create a similar HTML file directly (not
using Word as an Intermediary) instead of PDF

Thanks a lot
Avi
 
N

NickHK

Record a macro whilst performing a saveAs HTML or Publish. I got these 2:

Sub Macro1()
ActiveWorkbook.PublishObjects.Add(xlSourceSheet, _
"C:\Documents and Settings\Nick\Desktop\Page.htm", "Sheet1", "",
xlHtmlCalc, _
"Book1_26839", "").Publish (True)
End Sub

Sub Macro2()
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Nick\Desktop\Book1.htm",
FileFormat:=xlHtml, _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub

Depends what you need.

NickHK
 

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