clearRight Property

Microsoft FrontPage Visual Basic

clearRight Property

Returns or sets a Boolean that determines which sides of an element's box or boxes may not be adjacent to an earlier floating box. Read/write.

expression.clearRight

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

Remarks

Use the clearLeft property to clear the right side of a table cell.

Example

The following example creates a table and then sets the clearRight property of the cell on the left hand side of the table. As a result, the right hand side of the table adjacent to the cell will be empty.

    Sub ClearRightSide()
    Dim objSS As IFPStyleState
    Dim objLine1 As IHTMLElement
    Dim objLine2 As IHTMLElement
    Dim strHTML As String
    
    strHTML = "<table><tr><td><h1>This is line 1</h1></td>" _
        & "<td>This is line 2</td></tr></table>"
    
    With ActiveDocument
        .body.innerHTML = strHTML
    
        Set objLine1 = .all.tags("td").Item(0)
        Set objLine2 = .all.tags("td").Item(1)
        Set objSS = .createStyleState
    End With
    
    With objSS
        .GatherFromElement objLine2
        .clearRight = True
        .textDecorationUnderline = True
        .Apply
    End With
End Sub