如何获取word中表格的高度
请问如何获得word中某个表格的高度,即所有行的高度之和。 ------解决方案-------------------- 表格每行高度是均等,还是每行都不一样? ------解决方案--------------------
Sub 均等() Dim iCount As Integer iCount = Selection.Tables(1).Rows.Count MsgBox "当前表格的高度是:" & Selection.Tables(1).Rows.Height * iCount End Sub Sub 不均等() Dim i As Integer, lHeight As Double, oRows As Rows Set oRows = Selection.Tables(1).Rows For i = 1 To oRows.Count lHeight = lHeight + oRows(i).Height Next i MsgBox "当前表格的高度是:" & lHeight End Sub |
|