Workbook.PublishObjects Property (2007 System)
Gets the PublishObjects collection.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property PublishObjects As PublishObjects
'Usage
Dim instance As Workbook
Dim value As PublishObjects
value = instance.PublishObjects
[BrowsableAttribute(false)]
public PublishObjects PublishObjects { get; }
[BrowsableAttribute(false)]
public:
property PublishObjects^ PublishObjects {
PublishObjects^ get ();
}
public function get PublishObjects () : PublishObjects
Property Value
Type: PublishObjects
The PublishObjects collection.
Examples
The following code example uses the PublishObjects property to publish all static PublishObject items in the active workbook to the Web page.
This example is for a document-level customization.
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
private void WorkbookPublishObjects()
{
for (int i = 1; i <= this.PublishObjects.Count; i+)
{
if (this.PublishObjects[i].HtmlType ==
Excel.XlHtmlType.xlHtmlStatic)
{
this.PublishObjects[i].Publish(missing);
}
}
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.