Written by Allen Wyatt (last updated October 9, 2021)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365
Kelly has a custom color that she uses for headers and header rows in tables, but every time she closes Word and reopens it, she has to reestablish the color in the Color dialog box. Kelly wonders if there is a way to save the custom color so it is easier to access.
Yes, there is. The easiest way is to work with styles. The type of style you create, however, will depend on whether you want the text to use the custom color or whether you want the background of your table cells to use the color.
If you are concerned with the text, create a paragraph style for your headers. You can then apply that style to any text you want treated as a header. Not only will the color be affected, but so will any other character or paragraph attributes defined in the style. In other words, your headers will look just the way you want them to look. A good place to start if you want to create a paragraph style is this tip:
https://wordribbon.tips.net/T9627
If you are concerned with the background of your table cells, then you should consider creating a table style that defines how you want your first row (your header row) to look. A table style can also define other attributes, such as borders and fonts. To define a table style, refer to this tip:
https://wordribbon.tips.net/T6699
If your entire desire is to have your custom colors appear in the Recent Colors area of the Font Color drop-down list, then you'll need to go through a quick series of steps whenever you start Word. This is because Word clears the Recent Colors area every time you start the program; the colors previously there are wiped out, and this behavior is not modifiable.
In preparation for the quick series of steps, you'll need to define the paragraph styles I mentioned earlier, one for each of your header colors. Make sure that you store those paragraph styles in your Normal template so that they are available anytime you are using Word. With that done—and it only needs to be done a single time—here is the quick series of steps I mentioned. You'll need to perform these steps every time you start Word:
While 10 steps may not seem that "quick," they are much quicker than setting the RGB values of the desired colors every time you start Word.
Speaking of RGB colors, you could also apply the colors to text by using a very simple macro:
Sub FontColorHeading() Selection.Font.Color = RGB(168, 20, 50) End Sub
The macro uses the RGB function to set the color of the selected text. The macro will not, however, modify what is shown in the Recent Colors area of the Font Color drop-down list. If you prefer, instead, to use a macro to apply a background color to the first row in a table, you can us the following macro:
Sub ApplyColorToHeadingRow() Dim MyColor As Long ' Set the color using RGB values MyColor = RGB(21, 195, 154) If Selection.Information(wdWithInTable) Then Selection.Tables(1).Rows(1).Range.Shading.BackgroundPatternColor = MyColor Else MsgBox "Insertion point is not within a table" End If End Sub
The key to successfully using the macro is to make sure the insertion point is within the table you want affect.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (11310) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365.
Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!
One of the tools that Word makes available on the Home tab of the ribbon is the Text Highlight tool. This functions ...
Discover MoreThe Find and Replace tool is very powerful. If you need to use it many, many times in a row, however, it can quickly get ...
Discover MoreYou can use Find and Replace to change the attributes of text in your document. When you want to make changes to lots and ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-10-15 23:54:37
Tomek
@Kiwerry: follow-up to my previous comment:
You could create a macro to create the (multi)-colored text in a document. But you will still need to follow steps 4-10. Having a ready document is easier, I think.
2021-10-15 23:47:07
Tomek
There is a slightly easier way to "remind " Word about custom colors.
Instead of creating paragraphs and applying styles to them every time you start Word (steps 2-3, which need to be repeated if you have more than one color), just create and save such document once. You can save it as a regular document or a template. Using styles to do that will still work, but you can have just a few colored words in a single paragraph. Then you can open that document when starting Word and just follow steps 4-10. You can use words identifying the color formatted with that color, and select just these words instead of paragraphs in step 5. You probably can even just click within the colored word instead of selecting the whole word.
@Kiwerry: Creating a macro to automate this or original 10 steps may not be possible. Applying a color to selected text by macro does not add that color to Recent Colors list. It seems that the only way to add to Recent Colors is to do it manually from More Colors dialog. :-(
2021-10-09 15:13:53
Kiwerry
Interesting tip, thanks Allen.
Would it not be possible to automate the 10 steps given above in a macro that could either run automatically when Word is started, or one which could be run manually when needed?
It may interest some readers to note that with respect to Recent Colors Word behaves differently to Excel, where recent colours are defined in tags like, for example, <color rgb="FFFF9999"> in a section enclosed within <mruColors> ... </mruColors> tags in the “styles.xml” file in the xl folder within your xlsx or xlsm workbook file. To find this XML file, locate the workbook file, then add the file extension “.zip” to the file name, ignoring any grumbles you may get about doing this. Double-click the zip file and you can then navigate to (or search for) the styles.xml file inside the zip file, copy it to a temporary folder and view it with a text file viewer or editor. It can be edited and copied back to where it came from if you are sure of what you are doing and keep a backup of the original just in case. Note that the first two characters in the definition string ("FF" above) determine the colour transparency; the following three pairs are the Red, Green, Blue values. See https://peltiertech.com/removing-recent-colors-from-microsoft-excel/#:~:text=Changing%20Recent%20Colors&text=Delete%20the%20tag(,Delete%20the%20%E2%80%9C for more details and examples.
In Word the Recent Colors list appears in Word once at least one colour has been defined in a document, e.g. for cell shading in a table, but once the file has been closed these definitions disappear.
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments