|
请教如何通过VBA代码,删除括号内光标所在中文词(组)外的内容?
文档中单词有多个中文意思,各中文意思可能是以分号或逗号进行分隔,现在只要保留右击光标所在的中文意思,其他中文意思做删除处理(但仍保留中文意思的括号)(希望在右击时,能在右键中选择如“选取”时,就能删除括号内其他的中文意思及光标处所有中文意思中除括号外的所有西文字符);如果光标处的中文意思前后还含有西文字符或中文标点,也一并将其删除。但类似这样该中文意思中如果含有中、西文括号的,则不做处理
如:(词(组))或(词(组))保持原样(即不做处理)
原文档
One of the qualities that most people admire (vt.钦佩;羡慕;赞美)in others is the willingness to admit (vt.允许进入;v.承认,供认;准许…进入,准许…加入)one’s mistakes .It is extremely (ad.极度地;ad.极端地,非常地)hard sometimes to say a simple thing like “I was wrong about that,” and it is even harder to say,“ I was wrong, and you were right about that.”
现文档
One of the qualities that most people admire (钦佩)in others is the willingness to admit (承认)one’s mistakes .It is extremely (非常地)hard sometimes to say a simple thing like “I was wrong about that,” and it is even harder to say,“ I was wrong, and you were right about that.”
[ 本帖最后由 tangqingfu 于 2009-7-30 10:41 编辑 ] |
|