Log in  \/ 
x
or
x
x
Register  \/ 
x

or

 How to capitalize the first letter after colon in a Word document?

If you need to capitalize the first letters after colons in a Word document, to change them one by one manually will not be a good choice. This article, I will talk about a way to change the first lowercase letter to uppercase letter after the colons as quickly as possible.

Capitalize the first letters after colons with VBA code in a Word document


Capitalize the first letters after colons with VBA code in a Word document

The following VBA code can help you to make all the first letters uppercase after the colons in the whole Word document to capitalize, please do as this:

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Capitalize the first letters after colons:

Sub CapitalizeWordAfterColon()
    Application.ScreenUpdating = False
    Selection.HomeKey wdStory
    With Selection.Find
        .ClearFormatting
        .Text = ": ([a-z])"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchWholeWord = False
        .MatchSoundsLike = False
        .MatchCase = False
        .MatchWildcards = True
        .MatchAllWordForms = False
        With .Replacement.Font
          .AllCaps = True
          .SmallCaps = False
        End With
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Application.ScreenUpdating = True
End Sub

3. Then, press F5 key to run this code, and all the first letters after the colons have been converted to uppercase letters at once, see screenshot:

doc capitalize first letter after colon 1



Recommended Word Productivity Tools

 

Kutools For Word - More Than 100 Advanced Features For Word, Save Your 50% Time

  • Complicated and repeated operations can be done one-time processing in seconds.
  • Insert multiple images across folders into Word document at once.
  • Merge and combine multiple Word files across folders into one with your desired order.
  • Split the current document into separate documents according to heading, section break or other criteria.
  • Convert files between Doc and Docx, Docx and PDF, collection of tools for common conversions and selection, and so on...
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.