![]() |
#1
|
|||
|
|||
![]()
I have a word file containing English and Chinese words. When an English word exceeds four characters, it is necessary to shorten the line of English words to three characters. The rules are as follows:
Before After Rule a 日 a 日 No change aa 昌 aa 昌 No change aaa 晶 aaa 晶 No change aaam 㬪 aam 㬪 Delete the third character of the English word aahaf 鷼 aaf 鷼 Delete the third and fourth characters of the English word |
#2
|
||||
|
||||
![]()
You do not need a macro for this. All you need is a wildcard Find/Replace, where:
Find = <([A-Za-z]{2})[A-Za-z]@([A-Za-z])> Replace = \1\2
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Thanks macropod for the reply. Am I missing any steps? There are always no search results so that I cannot convert the attached file 1 (Before.docx) to attached file 2 (After.docx). Would you mind helping me?
|
#4
|
||||
|
||||
![]()
Did you check the 'Use wildcards' option?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
I got it. Thanks again.
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro in Word to find specific words? Will be used for good cause (prostate cancer research) | cancerresearcher | Word VBA | 15 | 07-23-2019 01:53 PM |
![]() |
mike0215 | Word VBA | 2 | 11-28-2017 07:25 AM |
Finding Non-English Words in an English and Non-English words document | mohsen.amiri | Word | 3 | 03-31-2015 11:20 PM |
![]() |
netchie | Word VBA | 6 | 08-28-2012 03:37 PM |
![]() |
icsjohn | Word VBA | 2 | 12-07-2011 06:44 PM |