PDA

View Full Version : VBA Code to change the color of a specific word in the document?



thecowmilk
10-12-2021, 03:28 AM
Hello,

I have a big word document which is an essay for my school and I want to change the font color of some words to be different. Since there are a lot of words doing it manually is painstaking and takes wayyy to much time and I would want to know if there would be some VBA code to change the font color of a word in the document. For example, I want to change the color from black(which is the default) to red or blue. How can I do this?

gmayor
10-12-2021, 04:03 AM
You don't really need a macro for this. You can use the replace function CTRL+H to replace the word and format it.
If you have several different words to format, you could use the Find and replace (with table defined formatting) option in https://www.gmayor.com/document_batch_processes.htm (http://www.gmayor.com/document_batch_processes.htm) to process them all sequentially.

thecowmilk
10-12-2021, 11:14 AM
You don't really need a macro for this. You can use the replace function CTRL+H to replace the word and format it.
If you have several different words to format, you could use the Find and replace (with table defined formatting) option in https:// www. gmayor. com/document_batch_processes.htm (https://www.gmayor.com/document_batch_processes.htm) to process them all sequentially.

I know what you are saying but I like to do it more using VBA as this sounds more interesting.

amandagreen
10-23-2021, 04:19 AM
Much thanks for the nitty gritty data - this is by and large the thing I was searching for! I need to impart to you one choice for taking care of the issue of composing an exposition and some other composed work - I generally go to buy college papers in such cases - this saves my time and simultaneously the outcomes are consistently sure without copyright infringement

Aussiebear
10-28-2021, 11:29 PM
I need to impart to you one choice for taking care of the issue of composing an exposition and some other composed work - I generally go to buy college papers in such cases - this saves my time and simultaneously the outcomes are consistently sure without copyright infringement

Surely this amounts to cheating.