Sub 删表格红色行()
'每个表格只能有一个红色的行,有多个只处理第一个
Dim tb As Table, cl As Cell
For Each tb In ActiveDocument.Tables
For Each cl In tb.Range.Cells
If cl.Range.Font.Color = 255 Then
cl.Row.Delete
Exit For
End If
Next
Next
MsgBox "处理完毕!"
End Sub
通过swagger.json转换word api文档后,发现有大量的exception行,做批量移除行操作。