IHTMLTableCell Object

Microsoft FrontPage Visual Basic

IHTMLTableCell Object

IHTMLTableCell

Represents a TD element in an HTML document. The IHTMLTableCell object provides access to a limited number of properties and methods related to the TD element. For access to all properties and methods, use the FPHTMLTableCell object.

Using the IHTMLTableCell object

Use the cells property of the IHTMLTableRow object to return an IHTMLElementCollection collection that represents a collection of all the TD elements in a row in a table. Use the Item method to return an IHTMLTableCell object that accesses a specific TD element, referenced by ordinal number or by the value of the id attribute. The following example accesses the first TD element in the first row in the first table in the active document.

    Dim objTable As IHTMLTable
Dim objRow As IHTMLTableRow
Dim objCell As IHTMLTableCell

Set objTable = ActiveDocument.all.tags("table").Item(0)
Set objRow = objTable.rows(0)
Set objCell = objRow.cells(0)