borderBottomWidth Property
Returns or sets a String that represents the width of the bottom border of a specified object.
expression.borderBottomWidth
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
The String value for the borderBottomWidth 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(ByRef objElement As IHTMLElement, ByRef strColor As String, _
ByRef strStyle As String, ByRef 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(objElement:=ActiveDocument.body.all.tags("p") _
.Item(0), strColor:="blue", strStyle:="dashed", strWidth:="thick")
End Sub