![]() |
|
|
|
#1
|
||||
|
||||
|
Yes, it would require a macro. The following shows how to randomly colour each letter individually - just don't expect quick results. Note too that some colours will look quite similar to others (some may even be the same).
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long
Randomize Timer
With ActiveDocument
For i = 1 To .Characters.Count
.Characters(i).Font.Color = Int(Rnd * 1048576)
Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Thank you, macropod, it works.
I've tried it at my girlfriend's laptop, a very old one, and it takes 1 minute to change the colors of a single page. Now I understand what some people says that macros are very slow. Regards |
|
#3
|
||||
|
||||
|
Actually, macros can do things very quickly. It's just that this one has a lot of work to do. Consider how long it would take you to change every character to a different colour manually and you'll get an idea of just how fast the macro is working. Of course, with a newer, faster PC, the macro would take even less time to do the job.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#4
|
|||
|
|||
|
I can't address the girlfriends computer, but here using the revised code above a single page of solid text (3588 characters) takes about 3 seconds.
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
first letter moves to far right
|
tira | Word | 2 | 01-18-2013 12:33 PM |
Formatting a letter
|
Ceri | Word | 1 | 05-03-2012 02:28 AM |
Business letter
|
MK_Huef | Word | 1 | 03-27-2012 03:27 AM |
| Auto Letter | Hannes | Word | 1 | 10-29-2009 06:27 AM |
| Letter Templates | happymouth | Word | 8 | 05-17-2009 02:43 AM |