This page is mildly interesting. [title]
If Winword uses RTF, it would seem Winword registered it. It'd be no surprise then if Outlook also registered it. Can you copy from Winword and paste to a non-Office app?
This page is also interesting. https://support.microsoft.com/en-us/kb/258513
It gives an example from VB.
The hard part might well be turning the selection into RTF in the first place.
Yeah, it works pasting into Word/Outlook. I tinkered a little with the Charles' HTMLDUMP and it does a good job. I've used it in the past to make documentation from command line help and wrote a BTM file (call all the help commands into the console) and a couple of SED scripts to clean up the HTML output from it.
This is a raw paste from either's HTML output or directly from the console.
prints the supplied string to terminal, which may contain color patterns:
print the following text in the selected color.
switch back to default color.
The original console HTMLDUMP output pastes without the finer coloring (top), however, after I ran it through my routine (bottom) it displays nicely.
I just tried your tool. If I redirect the output to CLIP: and paste the result I get raw HTML. If I send the output to a file an open the file in Chrome it renders as formatted text. If I copy *that* text the clipboard contains a new entry type. I assume 0xC11E is CF_HTML.
There are 5 clipboard formats.
9438 (0xC11E) - UNKNOWN
13 (0x0D) - CF_UNICODETEXT
16 (0x10) - CF_LOCALE
1 (0x01) - CF_TEXT
7 (0x07) - CF_OEMTEXT