查找黄色文本的所有实例并将字体颜色更改为红色 [英] Find all instances of yellow text and change font color to red
本文介绍了查找黄色文本的所有实例并将字体颜色更改为红色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一个 vba 宏来搜索 MS Word 2007 文档中所有字体颜色为黄色的文本并将其更改为红色.黄色不会显示在打印输出中.手动选择和更改将花费我几个小时.
I need a vba macro that searches for all text that has font color as yellow within a MS Word 2007 document and changes it to red. The yellow color won't show in the printouts. Manually selecting and changing will take me hours.
推荐答案
继 stakx 的 Word 97 解决方案之后,以下是 Word 2010 中的工作:
Following on from stakx’s Word 97 solution, here’s what works in Word 2010:
- 打开查找和替换对话框(例如 Ctrl-H)
- 点击查找内容"框.
- 格式下拉菜单,字体,选择要查找的字体颜色,确定.
- 点击替换为"框.
- 格式下拉菜单,字体,选择最终的颜色,确定.
- 注意查找内容"和替换为"的格式:描述现在不同了.
- 根据需要替换/全部替换/查找下一个.
您可以通过以下方式确定原始颜色:
You can determine the original colour as follows:
- 点击一些带有原始颜色的文本
- 打开调色板.如果主题颜色"和标准颜色"都没有选择,您可能需要点击更多颜色".
这篇关于查找黄色文本的所有实例并将字体颜色更改为红色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文