Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Finding two adjacent (wildcard) capital letters in MS Word?

1,768 views
Skip to first unread message

millinghill

unread,
Nov 16, 2010, 10:33:02 PM11/16/10
to
Hi.
I'm proofreading a 400+page document that I personally transcribed.
I've noticed many instances where I kept my finger on the SHIFT key
too long such that the first two letters of the word are capital
letters. It's driving my nuts to find and fix them. Wondering if
there's any way MS Word Find command can find two adjacent capital
letters as wildcards (i.e. I don't want to sit and search for AA, AB,
AC, AD, etc... to ZZ)?
Thanks!
Theodore

Tony Jollans

unread,
Nov 17, 2010, 4:15:52 AM11/17/10
to
To find them - expand the Find & Replace dialog and check "Use wildcards"; then, in the "Find what" box enter "[A-Z][A-Z]" (without the quotes). I don't think there's an easy way to replace them through the UI, but it wouldn't be hard to automate with a bit of VBA, like this:
 
    For n = 1 To 26
        ActiveDocument.Range.Find.Execute _
                             FindText:="([A-Z])" & ChrW(n + Asc("A") - 1), _
                             ReplaceWith:="\1" & ChrW(n + Asc("a") - 1), _
                             Replace:=wdReplaceAll, _
                             MatchWildcards:=True
    Next
 
For future reference - if you check the AutoCorrect box (Office button > Word options > Proofing tab > AutoCorrect Options) for "Two initial capitals", Word will automatically correct them as  you type.

--
Enjoy,
Tony
 

millinghill

unread,
Nov 17, 2010, 8:23:55 AM11/17/10
to
Totally awesome!
You rock, Tony. Thanks!

gielve...@gmail.com

unread,
Jun 25, 2016, 4:02:29 PM6/25/16
to
Many thanks. Useful for making an acronyms list.
0 new messages