|
本帖最后由 godhawk 于 2012-3-7 16:01 编辑
有一个word文件,大概2mb大,里面都是中文和英文混排,词和词混排
类似这样:
- Best wishes for the year to come!恭贺新禧!【Good luck 】in the year ahead!祝吉星高照!May you come into a【 good 】fortune!恭喜发财!Live long and proper!
- 多福多寿!May many【 fortunes find 】their way to you!祝财运亨通!I want to wish you longevity and health!愿你健康长寿!Take good care of 【yourself 】in the year ahead.请多保重!Wishing you many future successes.祝你今后获得更大成就。
复制代码
需要把除了【】括号内的英文之外,其他所有的英文都是删掉,中文保留不变
我的写法是:
Dim RngSel As Range
Set RngSel = Selection.Range
RngSel.Find.ClearFormatting
RngSel.Find.Replacement.ClearFormatting
RngSel.Find.Execute FindText:="^$", Forward:=True, Wrap:=wdFindStop, ReplaceWith:="", MatchWildcards:=False, Replace:=wdReplaceAll
但是这样的话,会把【】括号内的英文也一起删掉了,所以不可行……
请问有什么办法可以做出正确的筛选,只删除括号外的英文呢?
|
|