If you need to capitalize the first letter after a colon in a Word document, manually changing each letter is not an efficient option. This article will guide you on how to quickly convert the first letter after a colon to uppercase.
Capitalize the first letter after a colon using VBA code in Word
The following VBA code can help you capitalize all the first letters after a colon in the entire Word document at once. Please follow these steps:
- Press ALT + F11 to open the Microsoft Visual Basic for Application window.
- Click on Insert > Module and paste the following code into the Module window.
Application.ScreenUpdating = False
.Text = “: ([a-z])”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWholeWord = False
.MatchSoundsLike = False
.MatchCase = False
.MatchWildcards = True
.MatchAllWordForms = False
.AllCaps = True
.SmallCaps = False
Application.ScreenUpdating = True
Press F5 to run this code, and all the first letters after a colon will be converted to uppercase at once, as shown in the screenshot: