比如 我有一段文字如下(只是举例)
复仇的火焰开始 hello 在他心底 he 燃烧。 如此的 hit 痛苦,使他从脆弱到坚强。 为了有饭吃,他决 hello 定去当和尚。
我想查找前两段中以 h开头的单词并统计个数
可是每次用find时都会搜索全文或者是只搜索出一个单词就停止请问大家有没有解决办法,在下不盛感激!
拜托各位了!!!
复仇的火焰开始 hello 在他心底 he 燃烧。 如此的 hit 痛苦,使他从脆弱到坚强。 为了有饭吃,他决 hello 定去当和尚。
我想查找前两段中以 h开头的单词并统计个数
可是每次用find时都会搜索全文或者是只搜索出一个单词就停止请问大家有没有解决办法,在下不盛感激!
拜托各位了!!!
呵呵,因为总共才发了3个贴子,而且都是前不久发的,所以都还没结。
录制宏的结果是
Selection.Find.ClearFormatting
With Selection.Find
.Text = "&$*$&"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.Find.Execute
Selection.Find.Execute
可是我事先并不知道会有多少个以h开头的单词,没有办法决定Selection.Find.Execute执行多少次
.Text = "&$*$&"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End WithDo While Selection.Find.Execute
'找到目标后要做的事情放在这里,比如计数
Loop
中文设置成 :宋体, 五号字体
英文设置成 :Times New Roma, 小四号
数字设置成 :Times New Roma,五号