Copy html to clipboard

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to copy hyperlink to clipboard with Clipboard object.
It's working well with text, but not with HTML.

Text:

Clipboard.SetDataObject("Test")

HTML:

Dim clipDO As New DataObject = DataFormats.Html,
"<HTML><BODY>TEST</BODY></HTML>")
Clipboard.SetDataObject(clipDO, True)

Thank you
 
Hi,

I think it might be working for you the way it is (I tried the same example
with a TEST HTML so I could distinguish between TEST and TEST HTML ) - its
just that most applications don't recognize the html format on the clipboard
(can't paste into notepad, or even into visual studio.net html file UNLESS
you are viewing the DESIGN mode of an html page, then it pastes fine (I was
supprised that I couldn't use 'paste special' in MS Word - it seemed to know
there was html on the clipboard, but did not paste it..)
 
Back
Top