Borders.HasVertical property (Word)

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

Syntax

expression. HasVertical

expression A variable that represents a 'Borders' object.

Remarks

Vertical borders can be applied to ranges that contain cells in two or more columns of a table.

Example

If the selection supports vertical borders, this example applies a single vertical border.

If Selection.Borders.HasVertical = True Then 
 Selection.Borders(wdBorderVertical).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.