Class Borders (PowerPoint VBA)

A collection of LineFormat objects that represent the borders and diagonal lines of a cell or range of cells in a table. To use a Borders class variable it first needs to be instantiated, for example


Dim brds as Borders
Set brds = ActiveWindow.RangeFromPoint.Table.Rows(1).Cells

Count

Returns the number of objects in the specified collection.


Dim lngCount As Long
lngCount = ActiveWindow.RangeFromPoint.Table.Rows(1).Cells.Borders.Count

Item

Returns a LineFormat object for the specified border from the Borders collection.

The BorderType parameter value can be one of these PpBorderType constants.

Item (BorderType)

BorderType: Specifies which border of a cell or cell range is to be returned.


Dim lftBorder As LineFormat
Set lftBorder = ActiveWindow.RangeFromPoint.Table.Rows(1).Cells.Borders(BorderType:=1)