MS WORD: Finding words that are ALL CAPS

W

WillBeau

My question is: how to identify consecutive captial letters (ideally,
entirely capitalized words) in a string --- either by using Edit/Find or by
writing a VBA subroutine.

BACKGROUND
To prepare a large text file for import into MS Access, I need to locate the
lines of text that contain a word (any word) that is entirely capitalized ---
or, alternately, contain at least three consecutive capital letters. This
Edit/Find task would be part of a macro that would then insert paragraph
breaks at the start of such capitalized lines of text.

I tried a variety of wild card and format criteria to find capitalized words
(any capitalized word) in Edit/Find, but none worked. For example, ^$^$^$
with format property of ALL CAPS did not work for me.

For simplicity, I'd prefer to use Edit/Find, but I have working knowledge of
VBA if I must write a subroutine. Thanks for considering my question.
 
W

WillBeau

Please disregard this post. In frustration, I finally selected the "Use
Wildcards" option for the search [A-Z]{3,} --- which did the trick. I
wouldn't have thought [A-Z]{3,} would contain a wildcard, but apparently it
does. Hopefully this posting will help the next person with this same task.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top