Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2013, 03:26 PM
macropod's Avatar
macropod macropod is offline every letter different color Windows 7 64bit every letter different color Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,525
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #2  
Old 03-19-2013, 04:43 PM
skan skan is offline every letter different color Windows 7 64bit every letter different color Office 2010 64bit
Novice
every letter different color
 
Join Date: Mar 2013
Posts: 10
skan is on a distinguished road
Default

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
Reply With Quote
  #3  
Old 03-19-2013, 04:49 PM
macropod's Avatar
macropod macropod is offline every letter different color Windows 7 64bit every letter different color Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,525
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by skan View Post
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.
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]
Reply With Quote
  #4  
Old 03-28-2013, 04:16 AM
gmaxey gmaxey is offline every letter different color Windows 7 32bit every letter different color Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,636
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

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.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
every letter different color first letter moves to far right tira Word 2 01-18-2013 12:33 PM
every letter different color Formatting a letter Ceri Word 1 05-03-2012 02:28 AM
every letter different color 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

Other Forums: Access Forums

All times are GMT -7. The time now is 01:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft