Share via


CellBorder Object [Publisher 2003 VBA Language Reference]

Cell
CellBorder
ColorFormat

Represents the color and weight settings for cell borders.

Using the CellBorder object

Use the various border properties of the Cell object to return the different borders of a cell (left, right, top, bottom, and diagonal). The following example retrieves the top border of the first cell in a table.

Dim cbTemp As CellBorder

Set cbTemp = ActiveDocument.Pages(1) _
    .Shapes(1).Table.Cells.Item(1).BorderTop

Use the Color and Weight properties of the CellBorder object to format the appearance of a cell border. The following example makes the left border of the first cell in a table red and two points thick.

Dim cbTemp As CellBorder

Set cbTemp = ActiveDocument.Pages(1) _
    .Shapes(1).Table.Cells.Item(1).BorderLeft

cbTemp.Color.RGB = RGB(255, 0, 0)
cbTemp.Weight = 2

Properties | Application Property | Color Property | Parent Property | Weight Property

Parent Objects | Cell Object

Child Objects | ColorFormat Object