Borders.HasHorizontal property (Word)

True if a horizontal border can be applied to the object. Read-only Boolean.

Syntax

expression. HasHorizontal

expression A variable that represents a 'Borders' object.

Remarks

Horizontal borders can be applied to ranges that contain cells in two or more rows of a table or ranges that contain two or more paragraphs.

Example

This example applies single-line horizontal borders, if the selection supports horizontal borders.

If Selection.Borders.HasHorizontal = True Then 
 Selection.Borders(wdBorderHorizontal).LineStyle = _ 
 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.