Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
PublishoOjects error '1004' trying to publish web page through cod
Hi Folks
I'm trying to add some code to an Excel workbook to publsih workseets as webpages. I know this is possible using the autorepublish when the workbook is saved but I want to republsih these items on demand. The code I'm using is: --------- Dim myInt, I as Integer Set objPOjs = ActiveWorkbook.PublishObjects myInt = objPOjs.Count For I= t to myInt ActiveWorkbook.PublishObjects.Item(I).Publish Next I ----------- I've also tried --------- Set obj = ActiveWorkbook.PublishObjects For each objPO in objPObjs If objPo.HtmlType = xlHTMLStatic Then objPO.Publish End If Next objPO -------- I get no complaint when there are no objects to publish but as soon as I select areas and publish them as webpages then run the code it crashes saying: Run-time error '1004': Method 'Publish' of object 'PublishObject' failed Any ideas? Thanks Andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
publish as web page | Excel Discussion (Misc queries) | |||
Publish Excel to a web page | Excel Discussion (Misc queries) | |||
Publish as Wed Page | Setting up and Configuration of Excel | |||
publish excel as web page | Excel Programming | |||
Error 1004 - unable to set the orientation of the page setup class | Excel Programming |