borderTopWidth Property
Returns or sets a String that represents the width of the top border of a specified object.
expression.borderTopWidth
*expression * Required. An expression that returns one of the objects in the Applies To list.
Remarks
The String value for the borderTopWidth property can be one of the following:
medium |
Default width. |
thin |
Less than the default width. |
thick |
Greater than the default width. |
width |
Floating-point number, followed by an absolute units designator (cm , mm , in , pt , pc , or px ) or a relative units designator (em or ex ). |
Example
The following example sets the color, style, and size for the bottom, left, right, and top borders of the specified IHTMLElement object.
Sub SetBorders(objElement As IHTMLElement, strColor As String, _
strStyle As String, strWidth As String)
With objElement.Style
'Sets the bottom border properties.
.borderBottomColor = strColor
.borderBottomStyle = strStyle
.borderBottomWidth = strWidth
'Sets the left border properties.
.borderLeftColor = strColor
.borderLeftStyle = strStyle
.borderLeftWidth = strWidth
'Sets the right border properties.
.borderRightColor = strColor
.borderRightStyle = strStyle
.borderRightWidth = strWidth
'Sets the top border properties.
.borderTopColor = strColor
.borderTopStyle = strStyle
.borderTopWidth = strWidth
End With
End Sub
Use the following example to call the preceding subroutine.
Sub CallSetBorders()
Call SetBorders(ActiveDocument.body.all _
.tags("p").Item(0), "blue", "dashed", "thick")
End Sub
Applies to | FPHTMLStyle Object | IFPStyleState Object | IHTMLRuleStyle Object | IHTMLStyle Object