#1
|
|||
|
|||
Font Color Question//.Replacement.Font.Color = 12611584
I'm using the following code to highlight certain text in blue.
.Replacement.Font.Color = 12611584 Just wondering if someone would be able to provide me some other numbers like "12611584" to be used for other colors. Thanks, Roberto |
#2
|
||||
|
||||
Open a document in Word, select some text, and then record a macro. Click the Font Color icon on the Home tab of the Ribbon. Choose a bunch of different colors, and then stop the macro recording. You'll have the color values in the recorded macro, like this:
Code:
Sub Macro20() ' ' Macro20 Macro ' ' Selection.Font.Color = -553582593 Selection.Font.Color = -704577537 Selection.Font.Color = -553598977 Selection.Font.Color = -687800423 Selection.Font.Color = wdColorRed End Sub |
#3
|
|||
|
|||
Thanks for the info. I tried your numbers and found one that I like.
|
#4
|
||||
|
||||
Grab ColorCop, a free download. It is invaluable when working with colours. It will return a value like - &H86553D (grabbed from the blue bands in this forum's default style) which you can use in your code e.g.
Code:
Selection.Font.Color = &H86553D
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What color is my font? How to tell? | pintree3 | Word | 8 | 03-26-2015 10:43 AM |
Make a certain font face and font color as default in a document. | Singh_Edm | Word VBA | 2 | 09-13-2014 08:47 PM |
changing the font color | dbsoccer | Project | 1 | 11-01-2013 06:21 AM |
Tab Font's color? | lostsoul62 | Excel | 0 | 02-22-2013 12:21 PM |
need help with font color | samsongee | Word | 0 | 09-07-2006 10:18 PM |