我有一个 150 页的 word 文档,想在回答后删除以“答案:.....”开头的每个单词行,每行都有不同的内容,所以我无法找到所有回答删除它
浏览整个文档并找到所有实例需要几个小时,任何人都可以分享一个可以为我做的 vba 吗?
您可以在Find and Replace中使用通配符。单击更多>>展开对话框:
如果您真的想以编程方式执行此操作:
Dim doc As Word.Document
Set doc = ... 'determine the document you want to act on, and fill it here
Dim p As Paragraph
For Each p In doc.Paragraphs
If InStr(p.Range.Text, "Answer") = 1 Then p.Range.Delete
Next