Borders Collection Object
Word Developer Reference |
A collection of Border objects that represent the borders of an object.
Remarks
Use the Borders property to return the Borders collection. The following example applies the default border around the first paragraph in the active document.
Visual Basic for Applications |
---|
|
Border objects cannot be added to the Borders collection. The number of members in the Borders collection is finite and varies depending on the type of object. For example, a table has six elements in the Borders collection, whereas a paragraph has four.
Use Borders(index), where index identifies the border, to return a single Border object. Index can be one of the WdBorderType constants. Some of the WdBorderType constants may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.
Use the LineStyle property to apply a border line to a Border object. The following example applies a double-line border below the first paragraph in the active document.
Visual Basic for Applications |
---|
|
The following example applies a single-line border around the first character in the selection.
Visual Basic for Applications |
---|
|
The following example adds an art border around each page in the first section.
Visual Basic for Applications |
---|
|
See Also