Thread
:
Random letter colors?
View Single Post
#
6
m1sterb
Junior Member
Posts: 1
Quote:
Originally Posted by
LurfysMa
On Fri, 23 Dec 2005 21:55:57 -0500, Jay Freedman
wrote:
On Fri, 23 Dec 2005 16:34:09 -0800, LurfysMa
lid
wrote:
Is there any way to get Word to change each letter in a selection of
text to a random color? I am writing some Santa letters to some kids
in a playful font and I would like to print them in color.
I guess I could write a little macro.
You could write a little macro, but you might find a little wrinkle
that needs to be worked out. Yellow and white characters don't print
very well. g Try this:
Sub RandomColors()
Dim oCh As Range
Dim myColor As Word.WdColorIndex
Randomize
For Each oCh In ActiveDocument.Characters
Do ' get a random color that isn't white or yellow
myColor = 14 * Rnd() + 1
Loop Until (myColor wdWhite) And (myColor wdYellow)
oCh.Font.ColorIndex = myColor
Next oCh
End Sub
Is there any way this code could be modified to accept RGB values? Specifically if it was modified for one color as [255,0,255] and the other as [0,255,255].
All efforts at changing this are not going anywhere. Eventually, I'm looking at coping text from a .pdf into word, using this macro to randomize between the 2 colors and then converting back to pdf and reading via a color tablet. I would really appreciate it as it will assist in eye therapy.
Reply With Quote
m1sterb
View Public Profile
Send a private message to m1sterb
Find all posts by m1sterb