PublishObjects object (Excel)

A collection of all PublishObject objects in the workbook.

Remarks

Each PublishObject object represents an item in a workbook that has been saved to a webpage and can be refreshed according to values specified by the properties and methods of the object.

Example

Use the PublishObjects property of the Workbook object to return the PublishObjects collection. The following example saves all static PublishObject objects in the active workbook to the webpage.

Set objPObjs = ActiveWorkbook.PublishObjects 
For Each objPO in objPObjs 
 If objPO.HtmlType = xlHTMLStatic Then 
 objPO.Publish 
 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 = _ 
 "\\myserver\public\finacct\statemnt.htm"

Methods

Properties

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.