Macro to convert multiple RGB colors to Red

X

XGP

I need to convert word documents which have a large part of the text in
multiple custom RGB values to standard red RGB (255, 0, 0). I have already
made some other format changes editing macros but I am an absolute beginner
in VB. Can anyone help me with the VB code?
 
T

Tony Jollans

Hi XGP,

Potentially very difficult but if all other text in the document is
uncoloured you could do it with three Find and Replace operations like this
....

In all cases leave the Find and Replace text boxes blank.

1. (a) Click in the Find box, click on Format > Font and select Text Colour
"Automatic"

1. (b) Click in the Replace box, click on Format > Font and check "Hidden"
(or some other attribute that no other text in the document has)

1. (c) Replace All

2. (a) Click in the Find box, click on "No Formatting" then click on Format
Font and UNcheck "Hidden" (or whichever attribute you chose in the
previous operation)

2. (b) Click in the Replace box, click on "No Formatting" then click on
Format > Font and select Text Colour Red

2. (c) Replace All

3. (a) Click in the Find box, click on "No Formatting" then click on Format
Font and check "Hidden" (or whichever attribute you chose in the first
operation)

3. (b) Click in the Replace box, click on "No Formatting" then click on
Format > Font and UNcheck "Hidden" (or whichever attribute you chose in the
first operation)

3. (c) Replace All
 
X

XGP

Hi Tony,
Very smart and simple solution. It worked. I will now try to write the macro.
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top