Row 对象

         
Table
Rows (Row)
CellRange (Cell)

代表表格中的一行。Row 对象是 Rows 集合中的成员。Rows 集合中包含指定表格中的所有行。

使用 Row 对象

使用 Rows(index) 可返回一个 Row 对象,其中,index 是一个数字,它代表表格中行所在的位置。本示例删除表格(当前演示文稿中第二张幻灯片上的第五个形状)中的第一行。

ActivePresentation.Slides(2).Shapes(5).Table.Rows(1).Delete

使用 Select 方法可从表格中选择一行。本示例选择指定表格中的第一行。

ActivePresentation.Slides(2).Shapes(5).Table.Rows(1).Select

说明

使用 Cells 属性可修改 Row 对象中的各个单元格。本示例选择表格中的第二行,并对其下框线应用虚线样式。

ActiveWindow.Selection.ShapeRange.Table.Rows(2) _
    .Cells.Borders(ppBorderBottom).DashStyle = msoLineDash