Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
How do I save one page out of a 80 page report in excel? bellamere New Users to Excel 2 February 15th 06 08:25 PM
excel data automation to/from jsp page karthik Excel Worksheet Functions 0 February 8th 06 02:46 PM
Save as Web Page Eva Excel Discussion (Misc queries) 0 February 2nd 06 04:55 AM
Save As Web Page EricP Excel Programming 2 August 11th 04 04:35 AM


All times are GMT +1. The time now is 03:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"