Quote:
Originally Posted by Keithronaut
... I would love just a simple code to find all of the 11.5 pt. Calibri font within an entire Word Document and automatically turn it black.
|
Hi Keith. Well, there's bad news and there's even worse news.
First the bad news: Recording a simple macro to effect your specific needs doesn't work; at least, I can't make it work.
Now for the even worse news: I have confirmed that there is a bug in Recording and a bug in Executing macros to effect a change in colour.
Hi everyone else!
I use Word2003/VBA, and decided to record a simple Edit/Replace macro to effect a change to ADD a colour to any Courier New font. I chose to change to Orange, any text formatted in Courier New, because my text document was already black font; that doesn't change the form of the macro code.
In my text document I had text formatted locally in Courier New, and text formatted with a character style that used Courier New. So both local and style formatting.
My recorded macro did NOT record the colour change, although the change took effect while I was recording the macro.
I then edited my macro to use
".Replacement.Font.Color = wdColorOrange" and
".Replacement.Style = "csOrange"" with no success.
A colleague has since confirmed this behaviour with Word2021.
That thread can be read
here.
Cheers, Chris