Select and Copy Text by Font Color in Microsoft Word
Question details
Select and copy text of a particular font color from a Word document, potentially to count the words in each color.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- A document contains text in several font colors, and text of the same color may also have different fonts or sizes.
- Observed behavior
- The user wants to isolate text of one color for copying or word counting.
Identify the font color you want to collect and select an example in the document. If you plan to use a macro, check that your desktop version of Word supports VBA and that you know the target color's RGB values.
Select and copy text with similar formatting
Use Word's selection command when the target text shares the same color and other formatting.
This command matches similar formatting, not font color alone. Text with the target color may be missed if its font, size, or other formatting differs.
In the document, select a word that has the font color you want to copy.
On the Home tab, choose Editing > Select > Select Text with Similar Formatting.
Check the highlighted text, press Ctrl+C, and paste it into a new document or another destination.
If matching text was missed, select an example with different formatting and repeat the command. Alternatively, apply the same custom style to all target text first, then try the selection again.

Extract a font color with a Word VBA macro
Use a macro when matching text has inconsistent formatting or you need to repeat the extraction for several colors.
Edit Word Documents with WPS Writer
WPS Office is a free, lightweight alternative for editing Word documents in a familiar interface. Open compatible files to continue working with document formatting, though Word's selection command and VBA macro workflow are specific to Microsoft Word.

Frequently Asked Questions
Why didn't Word select all the blue text?
Home > Editing > Select > Select Text with Similar Formatting considers formatting beyond color. Blue text with a different font or size may be omitted; repeat the selection for each formatting group or use a color-based macro.
Can I count words for each font color?
Extract or copy each color into a separate document, then choose Review > Word Count. Check the result if individual words contain more than one color, because splitting and joining text can affect the count.
How do I change the color used by the macro?
In the VBA editor, replace RGB(0, 0, 255) in the macro with the target color's RGB values, then run the macro again from View > Macros.
Does the macro also extract colored text from headers and footers?
No. The example searches ActiveDocument.Content, which covers the main document body. Headers, footers, and other document areas require additional searches.




