In this article, we will focus on explaining 2 quick ways to batch change the color of multiple underlines in your Word document.
By default, the underline color in Word is set as “Automatic”. But it can be monotonous sometimes. So to both diversify the color set in your document, and to stand out the important contents, it’s a good choice to change the color of underline.
It’s easy to alter the underline color before creating it. Therefore, in the following contents, we would like to lay emphasis on modifying the color of existing underlines.
Method 1: Utilize the “Advanced Find” Feature
First and foremost, you have to find all the underline instances in current document. For this need, you can refer to our previous article: 2 Quick Ways to Search for Underlined Texts in Your Word Document
After finding and having all underlines in selection, you take the bellowing steps:
- You just click the upside-down triangle button behind the underline icon under “Home” tab.
- Then choose a color you like on the extended menu of “Underline Color”.
Here is our video demonstration:
Method 2: Run Word Macro
Word macro is such an amazing tool. We can not only use it to search for all underlines but also change the color of them. And both procedures can be finished in just one macro.
- To begin with, activate “Developer” tab and click on it.
- Then click “Visual Basic” in “Code” group.
- Next click “Normal”.
- Then click “Insert” tab.
- And select “Module” on the menu.
- Double click on the new module to open the editing space.
- Now paste the bellowing codes there:
Sub ChangeUnderlineColor() Dim objDoc As Document Dim objRange As Range Set objDoc = ActiveDocument Set objRange = objDoc.Range objRange.Find.ClearFormatting With objRange.Find .Font.Underline = wdUnderlineSingle .text = "" .Replacement.text = "" .Replacement.Font.UnderlineColor = wdColorBlue .Execute Format:=True, Replace:=wdReplaceAll End With End Sub
- Last but not the least, click “Run” button.
Notes:
- Firstly, code line “.Font.Underline = wdUnderlineSingle” means that this macro finds only the single underlines. You can change “wdUnderlineSingle” to “wdUnderlineDouble”, “wdUnderlineThick”, etc. For more underline constants, you can visit this link: https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2003/aa224269(v=office.11)
- Secondly, code line “.Replacement.Font.UnderlineColor = wdColorBlue” means the macro will change underline color to blue. And for more color constants, you can visit: https://docs.microsoft.com/en-us/office/vba/api/Word.WdColor
Retrieve Compromised Word Data
Word data loss is highly possible nowadays. For example, the most common error you will meet in Word is the screen freeze. Certainly, you can choose to restart the program. Sometimes, there shall be an auto-saved version of the document you are working on. However, we cannot rule out or afford the possibility of losing the document either completely or partially. Thus, we must think of ways to recover the data. And speaking of that, a professional Word repair tool is the key to its success.
Author Introduction:
Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including tool to repair damaged xls and pdf repair software products. For more information visit www.datanumen.com