Edit

Share via


Borders Interface

Definition

A collection of Border objects that represent the borders of an object.

public interface class Borders : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("0002093C-0000-0000-C000-000000000046")]
public interface Borders : System.Collections.IEnumerable
type Borders = interface
    interface IEnumerable
Public Interface Borders
Implements IEnumerable
Attributes
Implements

Remarks

Use the Borders property to return the Borders collection.

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 following WdBorderType constants: wdBorderBottom, wdBorderDiagonalDown, wdBorderDiagonalUp, wdBorderHorizontal, wdBorderLeft, wdBorderRight, wdBorderTop, or wdBorderVertical. Some of these constants may not be available to you, depending on the language support (U.S. English, for example) that you’ve selected or installed. Use the LineStyle property to apply a border line to a Border object.

Properties

AlwaysInFront

Returns or sets a value that indicates if page borders are displayed in front of the document text.

Application

Returns an Application object that represents the Microsoft Word application.

Count

Returns the number of items in the specified collection.

Creator

Returns a value that indicates the application in which the specified object was created.

DistanceFrom

Returns or sets a value that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds.

DistanceFromBottom

Returns or sets the space (in points) between the text and the bottom border.

DistanceFromLeft

Returns or sets the space (in points) between the text and the left border.

DistanceFromRight

Returns or sets the space (in points) between the right edge of the text and the right border.

DistanceFromTop

Returns or sets the space (in points) between the text and the top border.

Enable

Returns or sets the border formatting for the specified object.

EnableFirstPageInSection

Returns or sets a value that indicates if page borders are enabled for the first page in the section.

EnableOtherPagesInSection

Returns or sets a value that indicates if page borders are enabled for all pages in the section except for the first page.

HasHorizontal

Returns a value that indicates if a horizontal border can be applied to the object.

HasVertical

Returns a value that indicates if a vertical border can be applied to the specified object.

InsideColor

Returns or sets a value that indicates the 24-bit color of the inside borders.

InsideColorIndex

Returns or sets the color of the inside borders.

InsideLineStyle

Returns or sets the inside border for the specified object.

InsideLineWidth

Returns or sets the line width of the inside border of an object.

Item[WdBorderType]

Returns a value that indicates if vertical borders at the edges of paragraphs and tables are removed so that the horizontal borders can connect to the page border.

JoinBorders

Returns or sets a value that indicates if vertical borders at the edges of paragraphs and tables are removed so that the horizontal borders can connect to the page border.

OutsideColor

Returns or sets the 24-bit color of the outside borders.

OutsideColorIndex

Returns or sets the color of the outside borders.

OutsideLineStyle

Returns or sets the outside border for the specified object.

OutsideLineWidth

Returns or sets the line width of the outside border of an object.

Parent

Returns the parent object of the specified object.

Shadow

Returns or sets a value that indicates if the specified border is formatted as shadowed.

SurroundFooter

Returns or sets a value that indicates if a page border encompasses the document footer.

SurroundHeader

Returns or sets a value that indicates if a page border encompasses the document header.

Methods

ApplyPageBordersToAllSections()

Applies the specified page-border formatting to all sections in a document.

GetEnumerator()

Applies to