Capitalization after colon

G

Greg Maxey

Jill,
Can't be done with an options setting in Word. If you can
wait until the
document is typed you can go back and us the following
macro to correct any
inconsistencies. This macro will capitalize following a
colon and numbers:

Sub CapWordAfterNumbersAndColon()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.SmallCaps = False
.AllCaps = True
End With
With Selection.Find
.Text = ": {1,}[a-z]"
.Replacement.Text = "^&"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find.Replacement.Font
.SmallCaps = False
.AllCaps = True
End With
With Selection.Find
.Text = "[0-9]{1,}. {1,}[a-z]"
.Replacement.Text = "^&"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
-----Original Message-----
I am trying to get Word to automatically capitalize words
following a colon, but it won't. Any ideas?
 
J

JillZ

Loaded the new macro and it worked like a charm!!! You just saved me a WHOLE LOT of editing time. Thank you so much

----- Greg Maxey wrote: ----

Jill
Can't be done with an options setting in Word. If you can
wait until th
document is typed you can go back and us the following
macro to correct an
inconsistencies. This macro will capitalize following a
colon and numbers

Sub CapWordAfterNumbersAndColon(
Selection.Find.ClearFormattin
Selection.Find.Replacement.ClearFormattin
With Selection.Find.Replacement.Fon
.SmallCaps = Fals
.AllCaps = Tru
End Wit
With Selection.Fin
.Text = ": {1,}[a-z]
.Replacement.Text = "^&
.Forward = Tru
.Wrap = wdFindContinu
.Format = Tru
.MatchWildcards = Tru
End Wit
Selection.Find.Execute Replace:=wdReplaceAl
With Selection.Find.Replacement.Fon
.SmallCaps = Fals
.AllCaps = Tru
End Wit
With Selection.Fin
.Text = "[0-9]{1,}. {1,}[a-z]
.Replacement.Text = "^&
.Forward = Tru
.Wrap = wdFindContinu
.Format = Tru
.MatchWildcards = Tru
End Wit
Selection.Find.Execute Replace:=wdReplaceAl
End Su
-----Original Message----
I am trying to get Word to automatically capitalize words
following a colon, but it won't. Any ideas
 

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