Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


How to bold all instances of the same word in a Word document?

If there are multiple “outlook” texts in your Word file, now you need to format all the “outlook” texts as bold. How could you bold all instances of the same word in a large Word document as quickly as possible?

Bold all instances of the same word in a Word document with VBA code

Bold all instances of the same word in a Word document with VBA code

The following VBA code can help you to bold all instances of a specific word quickly and easily, please do as this:

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

2. And then, click Insert > Module, copy and paste below code into the opened blank module:

VBA code: Bold all instances of the same word

Sub BoldAll()
    Dim xStr As String
    xStr = InputBox("Please enter the word that you want to bold:", "KuTools for Word")
    If Trim(xStr) = "" Then
        MsgBox "Cann’t be empty!", vbInformation, "KuTools for Word"
    End If
    With ActiveDocument.Content.Find
        .Text = xStr
        .Replacement.Font.Bold = True
        .Replacement.Text = "^&"
        .Wrap = wdFindStop
        .Format = True
        .Forward = True
        .Execute Replace:=wdReplaceAll
    End With
End Sub

3. After inserting the code, and then press F5 key to run it, and a dialog box is popped out to remind you inserting the word that you want to bold, see screenshot:

doc bold specific word 1

4. And then, click OK button, and all the specific words have been formatted as bold at once.

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 ( Sign Up? )
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.