![]() |
|
#5
|
|||
|
|||
|
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
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Paste from Clipboard, Find and Replace All, Then Copy Results Back to The Clipboard
|
robnun | Word VBA | 7 | 01-03-2025 12:52 PM |
Copy Specific Text String To Clipboard At End Of Macro
|
et_33 | Excel Programming | 8 | 10-11-2022 06:24 AM |
| WORD MACRO COPY/PAST from clipboard | rachidlea | Word VBA | 0 | 11-16-2021 09:38 AM |
Simple macro to create a copy
|
eduzs | Word VBA | 3 | 05-17-2017 05:34 PM |
copy without using clipboard?
|
g48dd | Excel | 3 | 07-16-2011 10:28 PM |