FPHTMLTableCell Object

Microsoft FrontPage Visual Basic

FPHTMLTableCell Object

FPHTMLTableCell Multiple objects

Represents a TD element in an HTML document. See also the IHTMLTableCell object.

Using the FPHTMLTableCell object

Use the cells property of the FPHTMLTableRow 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 FPHTMLTableCell 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 FPHTMLTable
Dim objRow As FPHTMLTableRow
Dim objCell As FPHTMLTableCell

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

To return a reference to a specific cell, use the cellIndex property of the FPHTMLTableCell object. You can add or delete cells using the insertCell and deleteCell methods. To change or return the contents of a particular cell, use the innerHTML or innerText property.