LineWidth Property
Applies To
Border object.
Description
Returns or sets the line width of the border of an object. Returns a WdLineWidth constant or wdUndefined if the object either has no borders or has borders with more than one line width. Can be set to True, False, or one of the following WdLineWidth constants: wdLineWidth025pt, wdLineWidth050pt, wdLineWidth075pt, wdLineWidth100pt, wdLineWidth150pt, wdLineWidth225pt, wdLineWidth300pt, wdLineWidth450pt, or wdLineWidth600pt. Read/write Long.
Note If the specified line width isn't available for the border's line style, this property generates an error. To determine the line widths available for a particular line style, see the Borders and Shading dialog box (Format menu).
See Also
Enable property, InsideLineStyle property, InsideLineWidth property.
Example
This example adds a borders below the first row in table one in the active document.
If ActiveDocument.Tables.Count >= 1 Then
With ActiveDocument.Tables(1).Rows(1).Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
End With
End If
This example adds a wavy, red line to the left of the selection.
With Selection.Borders(wdBorderLeft)
.LineStyle = wdLineStyleSingleWavy
.LineWidth = wdLineWidth075pt
.ColorIndex = wdRed
End With