【发布时间】:2020-03-19 01:48:07
【问题描述】:
我正在尝试删除 Word 文档中不包含某些字符串的所有表格,但没有成功。
我当前的代码是:
Sub DeleteTablesIf()
Dim t As Table
For Each t In ActiveDocument.Tables
If t not contains "A" or "B" "C" then
t.Delete
End if
Next
End Sub
但我不知道如何检查每个表中是否存在字符串“A”或“B”或“C”。
提前感谢您的帮助。
【问题讨论】: