PublishObjects 对象 (Excel)PublishObjects object (Excel)

工作簿中所有**PublishObject** 对象的集合。A collection of all PublishObject objects in the workbook.

说明Remarks

每个PublishObject对象代表工作簿中已保存到网页的项目, 并且可以根据对象的属性和方法所指定的值进行刷新。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

使用工作簿对象的**PublishObjects** 属性可返回PublishObjects集合。Use the PublishObjects property of the Workbook object to return the PublishObjects collection. 下面的示例将活动工作簿中的所有静态PublishObject对象保存到网页中。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

使用PublishObjects (索引), 其中_索引_是工作簿中指定项的索引号, 返回一个PublishObject对象。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

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.