-
September 23rd, 2010, 12:33 PM
#1
Error in the vbscript code to publish a web page from excel
<code>
'on error resume next
Dim objApp, objBook, objRange, objSheet
set objApp = CreateObject("Excel.Application")
objApp.Visible = true
set objBook = objApp.Workbooks.Open("C:Test",,,,"abc")
ObjApp.Sheets("Report").Select
set objSheet = objBook.ActiveSheet
objSheet.PageSetup.PrintArea = "A1:BG32"
objSheet.Cells.Select
with objBook.PublishObjects.Add(xlSourcePrintArea, _
"C:\docs\Report.htm", "Report", "", xlHtmlStatic, _
"", "")
.Publish (True)
.AutoRepublish = False
end with
ChDir "C:\docs"
set objRange = nothing
objBook.close
objApp.Quit
set objSheet = nothing
set objApp = nothing
</code>
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|