Borders.Item Method (Word)
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.
Sub BorderItem()
ActiveDocument.Paragraphs(1).Borders.Item(wdBorderTop) _
.LineStyle = wdLineStyleDouble
End Sub