View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey[_2_] Greg Maxey[_2_] is offline
external usenet poster
 
Posts: 668
Default RGB Codes for 90% Black

25, 25, 25

76, 76, 76

You can set those two with a builtin in constant:

Selection.Font.Color = wdColorGray90

or

Selection.Font.Color = wdColorGray70

With any text selected you can determine the Long and RBG data with the
following macro:

Sub Test()
Dim oRng As Word.Range
Dim oColorLng As Long
Dim rVal As Long
Dim gVal As Long
Dim bVal As Long
Dim oColorRBG As String
Set oRng = Selection.Range
With oRng
oColorLng = oRng.Font.Color
rVal = oColorLng Mod 256
bVal = Int(oColorLng / 65536)
gVal = Int((oColorLng - (bVal * 65536) - rVal) / 256)
oColorRBG = CStr(rVal) & ", " & CStr(gVal) & ", " & CStr(bVal)
MsgBox "Long value: " & oColorLng & vbCr & vbCr & _
"RBG value: (" & oColorRBG & ")", vbInformation, "Chosen Color
Data"
End With
End Sub

ju2908 wrote:
Hi

I have to have to change the font colour of text in Word in 90% black
and 70% black.
I can't find the corect rgb codes for these

Can any one help
thanks
ju


--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org