View Single Post
 
Old 04-09-2020, 06:37 AM
mrsandes mrsandes is offline Windows 10 Office 2019
Novice
 
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