I need to copy/store a string of text into the clipboard but need that text to be formatted (font type, color, weight, etc.)
Private Sub copyToCB(varText As String)
Dim x As Variant
x = varText
CreateObject("htmlfile").parentWindow.clipboardData.setData "text", x
End Sub
The above does the job of storing the referred text into the clipboard but it's stored as plain text. I'd like it to be e.g. bold and red.
I've been scouring the Internet literally for hours, to no avail. You'd think this would be something straightforward but I'm at a total loss!