![]() |
|
|
|
#1
|
||||
|
||||
|
You might try:
.Text = "\([A-Z0-9]*[A-Z0-9]\)" but, depending on what else you have in parentheses, that may give some false matches.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Quote:
Paul, if I were to find also abbreviations that are not enclosed by parenthesis, what else would I have to delete on the code? I just removed the "\(" and "\)" on the search mechanism, but it gives me an error "Subscript out of range" and highlights the line: Code:
StrAcronyms = StrAcronyms & Split(StrTmp, "|")(1) & vbTab & Split(StrTmp, "|")(0) & vbCr Thanks for your help |
|
#3
|
||||
|
||||
|
Quote:
Code:
StrTmp = Replace(Replace(Replace(.Text, " (", "("), "(", "|"), ")", "")
Quote:
.MatchCase = True to: .MatchCase = False
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#4
|
|||
|
|||
|
Quote:
That change has a side effect of replacing the first instance of the acronym to all uppercase letters definition, so the first instance looks like: PARTS LIST (PL). Would you be aware of something to go around it? |
|
#5
|
||||
|
||||
|
Quote:
Quote:
.MatchCase = True before: .Replacement.Text = StrExp & " (" & StrAcc & ")"
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Creating a list of Acronyms / Abbreviations
|
daithy | Word | 4 | 03-12-2020 01:52 PM |
| Data Validation in Microsoft Word Template | BradleyCase | Word VBA | 1 | 07-16-2019 12:37 PM |
| Adding Professional Credential Abbreviations to Name | dyny723 | Outlook | 0 | 03-16-2018 07:14 AM |
Automate Job application word doc to Excel (with data validation)
|
dylansmith | Office | 1 | 02-11-2018 12:58 PM |
| validation email address in word text filed | sameerahmad_P | Word VBA | 1 | 03-07-2014 02:59 PM |