borderTop Property

Microsoft FrontPage Visual Basic

borderTop Property

Returns or sets a String that represents the properties for the top border of a specified object.

expression.borderTop

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

Remarks

The String for the borderTop property can be one or more of the following space-delimited values:

width Any value available to the borderTopWidth property.
style Any value available to the borderTopStyle property.
color Any value available to the borderTopColor property.

Example

The following example sets the bottom, left, right, and top borders for the specified element.

    Sub SetTopBottomLeftRightBorders(ByRef objElement As IHTMLElement, _
        ByRef strBorder As String)

    With objElement.Style
        .borderBottom = strBorder
        .borderLeft = strBorder
        .borderRight = strBorder
        .borderTop = strBorder
    End With
End Sub
  

Use the following example to call the preceding subroutine.

    Sub CallSetTopBottomLeftRightBorders()

    Call SetTopBottomLeftRightBorders(objElement:=ActiveDocument _
        .all.tags("p").Item(0), strBorder:="yellow dashed medium")

End Sub