Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2020, 04:04 AM
mrsandes mrsandes is offline Abbreviations Validation - Word Windows 10 Abbreviations Validation - Word Office 2019
Novice
Abbreviations Validation - Word
 
Join Date: Apr 2020
Posts: 10
mrsandes is on a distinguished road
Default

Thanks Paul.
I made these changes and added one more search possibility, as we may have a few characters between the capital letters in the acronmys, to do so I duplicated the code. Would you say there is a better way to do that?

I'm having the trouble of duplicates being listed in the table if they appear more than once in the text between parenthesis as well, would you know how to clear duplicates in word tables?



Thank you for your support so far and in advance if you take the time to support on these questions.
Reply With Quote
  #2  
Old 04-09-2020, 05:35 AM
macropod's Avatar
macropod macropod is offline Abbreviations Validation - Word Windows 7 64bit Abbreviations Validation - Word Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by mrsandes View Post
I made these changes and added one more search possibility, as we may have a few characters between the capital letters in the acronmys, to do so I duplicated the code. Would you say there is a better way to do that?
Probably, but since you haven't said what those characters are, it's impossible to say how the expression should be changed. That said, I certainly wouldn't use the expression you've used.
Quote:
Originally Posted by mrsandes View Post
I'm having the trouble of duplicates being listed in the table if they appear more than once in the text between parenthesis as well, would you know how to clear duplicates in word tables?
The appropriate way is to fix the document - you shouldn't have the same acronym in parentheses in multiple locations.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-09-2020, 06:37 AM
mrsandes mrsandes is offline Abbreviations Validation - Word Windows 10 Abbreviations Validation - Word Office 2019
Novice
Abbreviations Validation - Word
 
Join Date: Apr 2020
Posts: 10
mrsandes is on a distinguished road
Default

Thanks for the quick reply, Paul.

Quote:
Originally Posted by macropod View Post
Probably, but since you haven't said what those characters are, it's impossible to say how the expression should be changed. That said, I certainly wouldn't use the expression you've used.
The idea is to be able to use more than one find criteria. As we may have acronyms/abbreviations with 2 or more uppercase letters, as you had in your code, but there is also the possibility of having a lower case letter or a symbol in between uppercase letters.

I tried achieving that with the search:
Code:
.Text = "\(<([A-Z]{1,})?([A-Z]{1,})>\)"
but it wouldn't find uppercase letters only acronyms. From what I researched, using {0,} for the ? wouldn't work.

Quote:
Originally Posted by macropod View Post
Try:
Code:
      .Sort ExcludeHeader:=True, FieldNumber:="Column 1", CaseSensitive:=False, _
        SortFieldType:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending
That worked! Thanks a lot.
Reply With Quote
  #4  
Old 04-09-2020, 06:49 PM
macropod's Avatar
macropod macropod is offline Abbreviations Validation - Word Windows 7 64bit Abbreviations Validation - Word Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by mrsandes View Post
The idea is to be able to use more than one find criteria. As we may have acronyms/abbreviations with 2 or more uppercase letters, as you had in your code, but there is also the possibility of having a lower case letter or a symbol in between uppercase letters.
In that case, try:
.Text = "\([A-Z0-9][!\) ]@[A-Z0-9]\)"
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 04-14-2020, 04:32 AM
mrsandes mrsandes is offline Abbreviations Validation - Word Windows 10 Abbreviations Validation - Word Office 2019
Novice
Abbreviations Validation - Word
 
Join Date: Apr 2020
Posts: 10
mrsandes is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
In that case, try:
.Text = "\([A-Z0-9][!\) ]@[A-Z0-9]\)"
Thanks, Paul. The only problem with that is that it doesn't find the acronyms with 2 uppercase letters only.

Even though it is not the best approach, the double verification is working, so I will stick to that.

Thank you for your support!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Abbreviations Validation - Word 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
Abbreviations Validation - Word 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

Other Forums: Access Forums

All times are GMT -7. The time now is 01:20 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft