Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
publish as web page Hostohio Excel Discussion (Misc queries) 0 January 12th 10 06:47 PM
Automate 'Publish as Web Page'? dyowee Excel Discussion (Misc queries) 2 May 5th 08 01:19 PM
Publish as Wed Page JDH Setting up and Configuration of Excel 0 April 1st 08 03:21 PM
How to add todays date (static) to the current active cell using m JimmyJam75 Excel Discussion (Misc queries) 5 September 6th 06 11:23 AM
publish excel as web page Lakshmi Narayanan Excel Programming 0 February 24th 04 06:44 AM


All times are GMT +1. The time now is 06:17 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"