Rows 集合对象

         
Table
Rows (Row)
CellRange (Cell)

Row 对象的集合,代表表格中的行。

使用 Rows 集合

使用 Rows 属性可返回 Rows 集合。本示例把指定表格中所有行的高度更改为 160 磅。

Dim i As Integer
With ActivePresentation.Slides(2).Shapes(4).Table
    For i = 1 To .Rows.Count
        .Rows.Height = 160
    Next i
End With

使用 Add 方法可向表格中添加一行。本示例在被引用表格的第二行之前插入一个新行。

ActivePresentation.Slides(2).Shapes(5).Table.Rows.Add (2)

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

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