Word文档中行数的VBA例程

180it 2019-09-25 PM 2838℃ 0条

一个统计Word文档中行数的VBA例程

Sub test()

 Dim i As Integer
 Dim t As Table
 
i = ActiveDocument.range.ComputeStatistics(wdStatisticLines)
 For Each t In ActiveDocument.Tables
     i = i - t.range.ComputeStatistics(wdStatisticLines)
 Next
 MsgBox i

End Sub

支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

Word文档中行数的VBA例程