OutsideLineStyle Property

Applies To

Borders collection object.

Description

Returns or sets the outside border for the specified object. Returns wdUndefined if more than one kind of border is applied to the specified object; otherwise, returns False or a WdLineStyle constant. Can be set to True, False, or a WdLineStyle constant. Read/write Long.

Remarks

True sets the line style to the default line style and sets the line width to the default line width. The default line style and line 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
See Also

InsideLineStyle property, InsideLineWidth property, OutsideColorIndex property.

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