Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Publish active sheet as static web page
When I record a macro for publishing a sheet, I get this: Sub Macro2() ' ' Macro2 Macro ' Macro to save active sheet as static web page ' ' With ActiveWorkbook.PublishObjects.Add(xlSourcePrintAre a, _ "D:\Documents and Settings\My Documents\Schedule.htm", _ "August", "", xlHtmlStatic, "Schedule_2005_16684", "") .Publish (True) .AutoRepublish = False End With End Sub How do I get this to work on the active sheet, regardless of what it' name is? The workbook name is Schedule_2005, so what do the numbers after tha mean? Thanks for any and all help. I'm lost in this VBA stuff. Stellin -- Stellin ----------------------------------------------------------------------- Stellina's Profile: http://www.excelforum.com/member.php...fo&userid=2578 View this thread: http://www.excelforum.com/showthread.php?threadid=39186 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Publish active sheet as static web page
This may be rough, but it works: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 8/1/2005 to publish active sheet and the next sheet (to right) as web pages. With ActiveWorkbook.PublishObjects.Add( _ SourceType:=xlSourceRange, _ Filename:="ftp://mysite.com/Current.htm", _ Sheet:=ActiveSheet.Name, _ Source:="A2:I55", _ HtmlType:=xlHtmlStatic) Publish (True) AutoRepublish = False End With Dim i As Integer Dim intStart As Integer intStart = ActiveSheet.Index + 1 For i = intStart To Worksheets.Count If Not Worksheets(i).Visible = xlHidden Then 'Note: Could add "and Worksheets(i).Visible = xlVeryHidden to above Worksheets(i).Activate Exit Sub End If Next i With ActiveWorkbook.PublishObjects.Add( _ SourceType:=xlSourceRange, _ Filename:= "ftp://mysite.com/Next.htm", _ Sheet:=ActiveSheet.Name, _ Source:="A2:I55", _ HtmlType:=xlHtmlStatic) Publish (True) AutoRepublish = False End With End Sub -- Stellina ------------------------------------------------------------------------ Stellina's Profile: http://www.excelforum.com/member.php...o&userid=25784 View this thread: http://www.excelforum.com/showthread...hreadid=391868 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Publish active sheet as static web page
Well, I had this working, but now the second sheet is not publishing. Does anyone know why? Is there a way to publish 2 sheets to the same page in a stati format? Thanks, Stellin -- Stellin ----------------------------------------------------------------------- Stellina's Profile: http://www.excelforum.com/member.php...fo&userid=2578 View this thread: http://www.excelforum.com/showthread.php?threadid=39186 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
publish as web page | Excel Discussion (Misc queries) | |||
Automate 'Publish as Web Page'? | Excel Discussion (Misc queries) | |||
Publish as Wed Page | Setting up and Configuration of Excel | |||
How to add todays date (static) to the current active cell using m | Excel Discussion (Misc queries) | |||
publish excel as web page | Excel Programming |