colSpan Property

Microsoft FrontPage Visual Basic

colSpan Property

Returns or sets a Long that represents the number of columns a table cell will span.

expression.colSpan

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

The following example sets the first cell in the first row of the first table to span two columns. This example assumes that you have at least one TABLE element in the active document.

    Sub TableCellsSpanColumns()
    Dim objCell As FPHTMLTableCell
    
    Set objCell = ActiveDocument.body.all.tags("table") _
        .Item(0).rows.Item(0).cells.Item(0)
    
    objCell.colSpan = 2
End Sub