想写一个关于word的表格的perl处理,应该怎么判断文档里表格的个数和行数呢?
??
[解决办法]
Sub 判断表格个数和行数() Dim iTblCount As Integer Dim iTblRows As Integer Dim i As Integer Dim oTbl As Table iTblCount = ActiveDocument.Tables.Count MsgBox "当前文档中共有" & iTblCount & "个表格" For Each oTbl In ActiveDocument.Tables iTblRows = oTbl.Rows.Count i = i + 1 MsgBox "第" & i & "个表格的行数为" & iTblRows Next oTblEnd Sub