Borders.OutsideLineWidth Property (Word)
Returns or sets the line width of the outside border of an object. Read/write.
Syntax
expression .OutsideLineWidth
expression Required. A variable that represents a Borders collection.
Remarks
This property returns wdUndefined if the object has outside borders with more than one line width; otherwise, returns False or a WdLineWidth constant. Can be set to True, False, or a WdLineWidth constant.
Example
This example adds a wavy border around the first table in the active document.
If ActiveDocument.Tables.Count >= 1 Then
With ActiveDocument.Tables(1).Borders
.OutsideLineStyle = wdLineStyleSingleWavy
.OutsideLineWidth = wdLineWidth075pt
End With
End If
This example adds dotted borders around the first four paragraphs in the active document.
Set myDoc = ActiveDocument
Set myRange = myDoc.Range(Start:=myDoc.Paragraphs(1).Range.Start, _
End:=myDoc.Paragraphs(4).Range.End)
myRange.Borders.OutsideLineStyle = wdLineStyleDot
myRange.Borders.OutsideLineWidth = wdLineWidth075pt