OutsideLineWidth Property
Returns or sets the line width of the outside border of an object. 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. Read/write.
WdLineWidth can be one of these WdLineWidth constants. |
wdLineWidth025pt |
wdLineWidth050pt |
wdLineWidth075pt |
wdLineWidth100pt |
wdLineWidth150pt |
wdLineWidth225pt |
wdLineWidth300pt |
wdLineWidth450pt |
wdLineWidth600pt |
expression.OutsideLineWidth
expression Required. An expression that returns a Borders object.
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