Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-05-2015, 09:53 AM
rsrasc rsrasc is offline Font Color Question//.Replacement.Font.Color = 12611584 Windows 7 64bit Font Color Question//.Replacement.Font.Color = 12611584 Office 2010 64bit
Competent Performer
Font Color Question//.Replacement.Font.Color = 12611584
 
Join Date: Mar 2014
Location: Germany
Posts: 148
rsrasc is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 09-05-2015, 11:06 AM
cyraxote's Avatar
cyraxote cyraxote is offline Font Color Question//.Replacement.Font.Color = 12611584 Windows 7 64bit Font Color Question//.Replacement.Font.Color = 12611584 Office 2013
Novice
 
Join Date: Sep 2015
Location: Greenbelt, MD
Posts: 24
cyraxote is on a distinguished road
Default

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
Reply With Quote
  #3  
Old 09-05-2015, 01:39 PM
rsrasc rsrasc is offline Font Color Question//.Replacement.Font.Color = 12611584 Windows 7 64bit Font Color Question//.Replacement.Font.Color = 12611584 Office 2010 64bit
Competent Performer
Font Color Question//.Replacement.Font.Color = 12611584
 
Join Date: Mar 2014
Location: Germany
Posts: 148
rsrasc is on a distinguished road
Default

Thanks for the info. I tried your numbers and found one that I like.
Reply With Quote
  #4  
Old 09-05-2015, 09:03 PM
gmayor's Avatar
gmayor gmayor is offline Font Color Question//.Replacement.Font.Color = 12611584 Windows 7 64bit Font Color Question//.Replacement.Font.Color = 12611584 Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
I use it to match Word colours to clients' corporate styles.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Font Color Question//.Replacement.Font.Color = 12611584 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

Other Forums: Access Forums

All times are GMT -7. The time now is 11:37 PM.


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