Sub 删除关键字字符之后的所有内容()
Selection.Find.ClearFormatting
With Selection.Find
.Text = "中国人" '关键字保留
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute
range1 = Selection.End
Selection.Find.Execute
range2 = Selection.Start
ActiveDocument.Range(range1).Delete
'ActiveDocument.Range(range1, range2).Select
End Sub
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询