Share via


IHTMLTableSection Object

Multiple objects
IHTMLTableSection
IHTMLElementCollection

Represents the THEAD, TFOOT, and TBODY elements inside of a TABLE element in an HTML document. The IHTMLTableSection object provides access to a limited number of properties and methods related to the THEAD, TFOOT, and TBODY elements. For access to all properties and methods, use the FPHTMLTableSection object.

Using the IHTMLTableSection object

Use the tHead property of the IHTMLTable object to return an IHTMLTableSection object that represents the THEAD element for a table. The following example accesses the THEAD element for the first table in the active document.

Dim objTable As IHTMLTable
Dim objTHead As IHTMLTableSection

Set objTable = ActiveDocument.all.tags("table").Item(0)
Set objTHead = objTable.tHead

Use the createTHead method of the IHTMLTable object to add a THEAD element. Use the deleteTHead method of the FPHTMLTable object to remove a THEAD element.

Use the tFoot property of the IHTMLTable object to return an IHTMLTableSection object that represents the TFOOT element for a table. The following example accesses the TFOOT element for the first table in the active document.

Dim objTable As IHTMLTable
Dim objTHead As IHTMLTableSection

Set objTable = ActiveDocument.all.tags("table").Item(0)
Set objTHead = objTable.tFoot

Use the createTFoot method of the IHTMLTable object to add a TFOOT element. Use the deleteTFoot method of the IHTMLTable object to remove a TFOOT element.

Properties | Align Property | bgColor Property | rows Property | vAlign Property

Methods | deleteRow Method | insertRow Method

Parent Objects | FPHTMLTable Object | IHTMLTable Object

Child Objects | IHTMLElementCollection Object