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?
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 .ClearFormatting .Text = xStr .Replacement.ClearFormatting .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:
4. And then, click OK button, and all the specific words have been formatted as bold at once.
Recommended Word Productivity Tools
- 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...