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

M

millinghill

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
 
T

Tony Jollans

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.
 

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