Thread: export to html
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default export to html

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

"avi" wrote in message
s.com...
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