borderWidth Property
Returns or sets a String that represents the thickness of the left, right, top, and bottom borders for the specified object.
expression.borderWidth
*expression * Required. An expression that returns one of the objects in the Applies To list.
Remarks
You can set the borderWidth property to one of the following String values:
medium | Border is the default width. |
thin | Border is less than the default width. |
thick | Border is greater than the default width. |
value | 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 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 | FPHTMLStyle Object | IHTMLRuleStyle Object | IHTMLStyle Object