This is my macro:
Code:
Sub ColorRGBText()
OPT = InputBox("Get Color[1], Apply Color[2]", "Color Management", "1")
If OPT = 1 Then
'MsgBox Selection.Font.TextColor.RGB
MyColor = Selection.Font.TextColor.RGB 'gets the color
Dim MyData As DataObject: Set MyData = New DataObject
MyData.SetText MyColor: MyData.PutInClipboard 'copies color code into ClBrd
End If
'When the macro is restarted and option 2 selected, the color code should be applied to a different text selection
If OPT = 2 Then Selection.Font.TextColor.RGB = MyColor
End Sub