计算表格单元格中的子表格

时间:2017-09-21 12:04:11

标签: vba ms-word word-vba

在具有多行的Wordtable中,我需要计算每行中有多少个子表。每行有两列,子表放在第二列,即Cell(row, 2)

类似的东西:

For Each oRow In tblTable.Rows
    iCountTables = tblTable.Cell(oRow, 2).Tables.Count
Next

但这确实有效。

1 个答案:

答案 0 :(得分:0)

protected override void OnSizeAllocated(double width, double height)
{
    base.OnSizeAllocated(width, height); //must be called
    if (this.width != width || this.height != height)
    {
        this.width = width;
        this.height = height;

        // do what ever you like here
    }
}