Save as single file webpage

D

dd

I have a list of hyperlinked files, which, when saved as a signle file
webpage, the user can right click and save.
The list will become bigger and bigger as work goes on. I want be able to
select the print area and then hit the
save command button to save as a single file web page.

I'e added a save command button to the page and recorded the following macro
to apply to the button, but it doesn't work.

Private Sub cmdSave_Click()
With ActiveWorkbook.PublishObjects.Add(xlSourcePrintArea, _
"P:\GBGWA\Rail\Jobs\5048337 OPI06\Surveys\Index of Proforma
Files.mht", "List1" _
, "", xlHtmlStatic, "Proforma Index (pfm files)_27036", "")
.Publish (True)
.AutoRepublish = False
End With


End Sub

I get an error at .Publish (True) "Runtime error 1004 Application-defined or
object-defined error."

Please advise
D Dawson
 

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