This documentation is archived and is not being maintained.

PublishObjects Collection Object [Excel 2003 VBA Language Reference]

Office 2003

A collection of all PublishObject objects in the workbook. Each PublishObject object represents an item in a workbook that has been saved to a Web page and can be refreshed according to values specified by the properties and methods of the object.

Using the PublishObjects Collection

Use the PublishObjects property to return the PublishObjects collection. The following example saves all static PublishObject objects in the active workbook to the Web page.

Set objPObjs = ActiveWorkbook.PublishObjects
For Each objPO in objPObjs
    If objPO.HtmlType = xlHTMLStatic Then
    End If
Next objPO

Use PublishObjects(index), where index is the index number of the specified item in the workbook, to return a single PublishObject object. The following example sets the location where the first item in workbook three is saved.

Workbooks(3).PublishObjects(1).FileName = _

Methods | Add Method | Delete Method | Publish Method

Parent Objects | Workbook

Child Objects | PublishObject Object