Borders.OutsideLineStyle property (Word)

Returns or sets the outside border for the specified object. .


expression. OutsideLineStyle

expression Required. A variable that represents a 'Borders' collection.


This property 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.

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


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

See also

Borders Collection Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.