Borders.Item Method

Word Developer Reference

Returns a border in a range or selection.

Syntax

expression.Item(Index)

expression   Required. A variable that represents a Borders collection.

Parameters

Name Required/Optional Data Type Description
Index Required WdBorderType The border to be returned.

Return Value
Border

Example

This example inserts a double border above the first paragraph in the active document.

Visual Basic for Applications
  Sub BorderItem()
    ActiveDocument.Paragraphs(1).Borders.Item(wdBorderTop) _
        .LineStyle = wdLineStyleDouble
End Sub

See Also