That number doesn't have to be 7 or 8 digits. It can be three and it represents a long data type.
Experiment with this in a new document:
Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
ActiveDocument.Range.Text = "ABC...XYZ"
'Assign color using constants.
ActiveDocument.Range.Characters(1).Font.Color = wdColorRed
ActiveDocument.Range.Characters(2).Font.Color = wdColorGreen
ActiveDocument.Range.Characters(3).Font.Color = wdColorBlue
'Color property returns a long data type
Debug.Print ActiveDocument.Range.Characters(1).Font.Color
Debug.Print ActiveDocument.Range.Characters(2).Font.Color
Debug.Print ActiveDocument.Range.Characters(3).Font.Color
'Assign color using long values.
ActiveDocument.Range.Characters(4).Font.Color = 255
ActiveDocument.Range.Characters(5).Font.Color = 32768
ActiveDocument.Range.Characters(6).Font.Color = 16711680
'What are the RGB values?
Debug.Print fcnLongToRGB(255) 'Red
'Green has a long value 32768
Debug.Print fcnLongToRGB(32768) 'Green
'Blue as a long value 16711680
Debug.Print fcnLongToRGB(16711680) 'Blue
'Assign color using RGB values
ActiveDocument.Range.Characters(7).Font.Color = RGB(255, 0, 0)
ActiveDocument.Range.Characters(8).Font.Color = RGB(0, 128, 0)
ActiveDocument.Range.Characters(9).Font.Color = RGB(0, 0, 255)
End Sub
Code:
Function fcnLongToRGB(ByRef lngColor As Long) As String
Dim lngRed As Long, lngGreen As Long, lngBlue As Long
lngRed = lngColor Mod 256
lngGreen = (lngColor \ 256) Mod 256
lngBlue = (lngColor \ 256 \ 256) Mod 256
fcnLongToRGB = "RGB(" & lngRed & "," & lngGreen & "," & lngBlue & ")"
End Function