Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save As Web Page Automation Help
Please be kind, I'm just starting to learn to program
Excel. I've tried automating the "save as web page" process by recording a macro, but it's not working. I would like to place a button on the worksheet so that a press of the button will save it as a web page to a defined location/filename. I have everything ready to go, except the code. Recording macros didn't help. Thx |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save As Web Page Automation Help
Hi Steve
Try this to save the activesheet as a htm file Sub test() Dim sName As String sName = "C:\test.htm" ActiveWorkbook.PublishObjects.Add( _ SourceType:=xlSourceRange, _ Filename:=sName, _ Sheet:=ActiveSheet.Name, _ Source:=ActiveSheet.UsedRange.Address, _ HtmlType:=xlHtmlStatic).Publish End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Steve" wrote in message ... Please be kind, I'm just starting to learn to program Excel. I've tried automating the "save as web page" process by recording a macro, but it's not working. I would like to place a button on the worksheet so that a press of the button will save it as a web page to a defined location/filename. I have everything ready to go, except the code. Recording macros didn't help. Thx |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save As Web Page Automation Help
"Ron de Bruin" wrote: Hi Steve Try this to save the activesheet as a htm file Sub test() Dim sName As String sName = "C:\test.htm" ActiveWorkbook.PublishObjects.Add( _ SourceType:=xlSourceRange, _ Filename:=sName, _ Sheet:=ActiveSheet.Name, _ Source:=ActiveSheet.UsedRange.Address, _ HtmlType:=xlHtmlStatic).Publish End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Steve" wrote in message ... Please be kind, I'm just starting to learn to program Excel. I've tried automating the "save as web page" process by recording a macro, but it's not working. I would like to place a button on the worksheet so that a press of the button will save it as a web page to a defined location/filename. I have everything ready to go, except the code. Recording macros didn't help. Thx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
How do I save one page out of a 80 page report in excel? | New Users to Excel | |||
excel data automation to/from jsp page | Excel Worksheet Functions | |||
Save as Web Page | Excel Discussion (Misc queries) | |||
Save As Web Page | Excel Programming |