一个统计Word文档中行数的VBA例程
这是一个计算Word中文档行数的例程(表格中的行数不算)。
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
欢迎访问我的主博客《许阳的红泥屋》
征诛志异,三让两家王朝;功同开辟,一桮万古江南。