Word VBA 查找文档中有多少个指定字符串?

Sub 查找文档中有多少个指定字符串()


dai_cha_zhao_text = InputBox("请输入您要查找到字符串:", "                           包含多少个字符串查找")

With ActiveDocument.Content.Find

     Do While .Execute(FindText:=dai_cha_zhao_text) = True

          count_number = count_number + 1

     Loop

End With

MsgBox ("当前文档共查找到" & Str(count_number) & "个" & dai_cha_zhao_text), , "     查找结果"


End Sub

查找文档中有多少个指定字符串?

    原文作者:wjf63000
    原文地址: https://blog.csdn.net/weixin_41422954/article/details/107272338
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞