Word VBA通配符搜索匹配
如何在范围内提取通配符搜索的查找结果?
dim r as range
set r = activedocument.range
Do While r.Find.Execute(findtext:="<*>", MatchWildcards:=True) = True
Msgbox <Show the matching word it found here>
if **<the word it matched>** = "Stop" then do something here
Loop
上面的代码使用范围来通过使用&lt; *>作为通配符模式来查找范围中的任何整个单词。但是我怎样才能得到它找到的当前匹配/单词?
没有找到相关结果
已邀请:
1 个回复
导力疵谜
编辑:我不太熟悉单词对象模型。
方法适用于
,但我不知道,如何找到它能找到的文本。运行宏后,上面的代码被修改,以查看生成的输出。 希望有所帮助。