HasHorizontal Property 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