Share via


borderColor Property

Returns or sets a String, specifying a color name or red-green-blue (RGB) value, that represents the border color of the object.

expression.borderColor

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

Remarks

For more information about setting colors, see the HTML Color Table.

Example

The following example modifies the border color, style, and width of the specified element.

Sub SetElementBorders(ByRef objStyle As FPHTMLStyle, ByRef strColor As String, _
        ByRef strStyle As String, ByRef strWidth As String)

    With objStyle
        .borderColor = strColor
        .borderStyle = strStyle
        .borderWidth = strWidth
    End With

End Sub

Use the following example to call the preceding subroutine.

Sub CallSetElementBorders()

    Call SetElementBorders(objStyle:=ActiveDocument.all.tags("p") _
        .Item(0).Style, strColor:="red", strStyle:="double", strWidth:="thin")

End Sub

Applies to | FPHTMLFrameElement Object | FPHTMLFrameSetSite Object | FPHTMLStyle Object | FPHTMLTable Object | FPHTMLTableCell Object | FPHTMLTableRow Object | IHTMLFrameElement Object | IHTMLFrameSetElement Object | IHTMLRuleStyle Object | IHTMLStyle Object | IHTMLTable Object | IHTMLTableCell Object | IHTMLTableRow Object