[英]VBA Macro to Delete Empty Lines in Word Tables
由于未提供,因此未在与OP相同的数据集上进行测试。
Option Explicit
Sub TEST()
Dim tbl As Table
Dim mDoc As Document
Dim oRow As Row
Set mDoc = ActiveDocument
For Each tbl in mDoc.Tables
For Each oRow In tbl.Rows
If Len(oRow.Cells(2).Range.Text) = 3 And _
Left(oRow.Cells(2).Range.Text, 1) = "$" Then
oRow.Delete
End If
Next oRow
Next tbl
End Sub
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.