Compartilhar via


WorkbookBase.PublishObjects Property

Definition

Gets the PublishObjects collection.

public:
 property Microsoft::Office::Interop::Excel::PublishObjects ^ PublishObjects { Microsoft::Office::Interop::Excel::PublishObjects ^ get(); };
public Microsoft.Office.Interop.Excel.PublishObjects PublishObjects { get; }
member this.PublishObjects : Microsoft.Office.Interop.Excel.PublishObjects
Public ReadOnly Property PublishObjects As PublishObjects

Property Value

The PublishObjects collection.

Examples

The following code example uses the PublishObjects property to publish all static Microsoft.Office.Interop.Excel.PublishObject items in the active workbook to the Web page.

This example is for a document-level customization.

private void WorkbookPublishObjects()
{
    for (int i = 1; i <= this.PublishObjects.Count; i++)
    {
        if (this.PublishObjects[i].HtmlType ==
            Excel.XlHtmlType.xlHtmlStatic)
        {
            this.PublishObjects[i].Publish();
        }
    }
}
Private Sub WorkbookPublishObjects()
    Dim i As Integer
    For i = 1 To Me.PublishObjects.Count
        If Me.PublishObjects(i).HtmlType = _
            Excel.XlHtmlType.xlHtmlStatic Then
            Me.PublishObjects(i).Publish()
        End If
    Next i
End Sub

Applies to