In this article, we want to show you 3 easy and effectual methods to replace a specific font in your Word document.
To process a document in Word often requires more than editing. For example, we are also supposed to consider such elements as style, page layout, etc. And one of all the kinds is the font employment. Given that we are likely to change a font to another one quite often, here we have 3 ways to help us easily handle the task.
Method 1: Use “Find and Replace” Feature
- First and foremost, click “Home” tab.
- Then click “Replace” in “Editing” group.
- Next in “Find and Replace” dialog box, make sure you are under “Replace” tab. Put insertion pointer in “Find what” box and ensure it’s blank.
- Click “More” button on the down-left corner to extend more options.
- Now click “Format” first.
- Then choose “Font” to open the “Find Font” box.
- Choose the “Font” type you want to replace.
- Next click “OK”.
- Then place insertion pointer in “Replace with” text box and be certain there is no single character.
- Repeat step 5 and 6. Only this time in “Find Font” box, you should select the font with which you want to replace. Then click “OK”.
- Lastly, click “Replace All” in “Find and Replace” box.
Method 2: Use Macro to Replace Font in one Document
- First off, press “Alt+ F11” to trigger Word VBA editor.
- Then click “Normal” and then “Insert”.
- Choose “Module” to insert a new module under “Normal” project.
- Next double click on it to open the editing space.
- Paste the following codes there:
Sub ReplaceFontForOneDocument() Dim objSingleWord As Range Dim objDoc As Document Set objDoc = ActiveDocument With objDoc For Each objSingleWord In .Words If objSingleWord.Font.Name = "Calibri" Then objSingleWord.Font.Name = "Times New Roman" End If Next End With End Sub
- Finally, remember to click “Run” button.
- In code line “If objSingleWord.Font.Name = “Calibri” Then”, replace “Calibri” with the font type in the document you don’t need anymore.
- In code line “Font.Name = “Times New Roman””, change “Times New Roman” with the font you want to apply for the file.
Method 3: Run Macro to Replace Font in Multiple Documents
The aforementioned 2 methods all talk about instructions to replace font in one document. Now let’s take a look at how to replace font in multiple documents. The solution here, of course, is running a Word macro.
- To begin with, arrange all target documents in one folder.
- Then open Word and trigger VBA editor, and the code editing space using the steps in method 2.
- Next paste the bellowing codes:
Sub BatchReplaceFont() Dim objDoc As Document Dim objSingleWord As Range Dim strFile As String, strFolder As String 'Initialization strFolder = "C:\Users\Test\Desktop\test files\" strFile = Dir(strFolder & "*.docx", vbNormal) 'Replace a specific font with another in all files under the same folder. While strFile <> "" Set objDoc = Documents.Open(FileName:=strFolder & strFile) For Each objSingleWord In objDoc.Words If objSingleWord.Font.Name = "Calibri" Then objSingleWord.Font.Name = "Time New Roman" End If Next objSingleWord objDoc.Save objDoc.Close strFile = Dir() Wend End Sub
- Hit the “Run” button at last.
- The “Calibri” is the font you don’t need and the “Time New Roman” is the one you want.
- In code line “strFolder = “C:\Users\Test\Desktop\test files\””, the “C:\Users\Test\Desktop\test files\” represents the folder path. And don’t forget the last “\” following the path.
Fix Surprising Word Errors
Errors can appear every now and then in Word. And the consequence is lethal to our Word files. One way to tackle the surprising collapses in Word is to back up often. Then there is nothing to be afraid of. Another way is to recuse files after they get corrupt that is a Word docx error repair product.
Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupt xls recovery tool and pdf repair software products. For more information visit www.datanumen.com