Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.word.newusers
LurfysMa
 
Posts: n/a
Default Random letter colors?

On Fri, 23 Dec 2005 21:55:57 -0500, Jay Freedman
wrote:

On Fri, 23 Dec 2005 16:34:09 -0800, LurfysMa
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


Wow. That is slick. I had a much more complicated macro going.

Can I ask you to tweak it so that it

(a) Only works on the currently selected text, and
(b) Only uses a predefined list of colors (red, green, blue, for
example)?

Thanks

--
Running Word 2000 SP-3 on Windows 2000
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert to Symbols Omar Menjivar Microsoft Word Help 7 June 27th 05 07:32 PM
School Reports CS Mailmerge 5 May 4th 05 07:20 AM
Letter Wizard templates will not work e2rodney Mailmerge 1 February 17th 05 08:30 PM
Can't save merged form letter... Raven Mailmerge 1 January 27th 05 08:34 PM
How do I access a created template from letter wizard trying to streamline Microsoft Word Help 6 January 5th 05 02:52 AM


All times are GMT +1. The time now is 06:54 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"