OutsideLineStyle Property

Microsoft Word Visual Basic

WdLineStyle can be one of these WdLineStyle constants.
wdLineStyleDashDot
wdLineStyleDashDotDot
wdLineStyleDashDotStroked
wdLineStyleDashLargeGap
wdLineStyleDashSmallGap
wdLineStyleDot
wdLineStyleDouble
wdLineStyleDoubleWavy
wdLineStyleEmboss3D
wdLineStyleEngrave3D
wdLineStyleInset
wdLineStyleNone
wdLineStyleOutset
wdLineStyleSingle
wdLineStyleSingleWavy
wdLineStyleThickThinLargeGap
wdLineStyleThickThinMedGap
wdLineStyleThickThinSmallGap
wdLineStyleThinThickLargeGap
wdLineStyleThinThickMedGap
wdLineStyleThinThickSmallGap
wdLineStyleThinThickThinLargeGap
wdLineStyleThinThickThinMedGap
wdLineStyleThinThickThinSmallGap
wdLineStyleTriple

expression.OutsideLineStyle

expression    Required. An expression that returns a Borders object.

Remarks

True sets the line style to the default line style and the line width to the default line width. The default line style and width can be set using the DefaultBorderLineWidth and DefaultBorderLineStyle properties.

Use either of the following instructions to remove the outside border from the first table in the active document.

ActiveDocument.Tables(1).Borders.OutsideLineStyle = wdLineStyleNone
ActiveDocument.Tables(1).Borders.OutsideLineStyle = False
		

Example

This example adds a double 0.75-point border around the first paragraph in the active document.

With ActiveDocument.Paragraphs(1).Borders
    .OutsideLineStyle = wdLineStyleDouble
    .OutsideLineWidth = wdLineWidth075pt
End With
		

This example adds a border around the first table in the active document.

If ActiveDocument.Tables.Count >= 1 Then
    Set myTable = ActiveDocument.Tables(1)
    myTable.Borders.OutsideLineStyle = wdLineStyleSingle
End If