R
Robert Manookian
Can anybody show me how to place simple HTML into the clipboard that can be
copied to an office application? I've tried setting simple using the
following:
Dim strHTML As String = "<P>The <B><FONT
size='4'><U>Clipboard</U></FONT></B>" & _
"is <FONT size='5'>Cool!</FONT></P>"
' Place HTML version in DataObject
Dim myDataObject As New DataObject()
myDataObject.SetData(DataFormats.Html, strHTML)
' Now place myDataObject, and thus all formats on the Clipboard
Clipboard.SetDataObject(myDataObject, True)
Can not paste this HTML into Word or Excel.
copied to an office application? I've tried setting simple using the
following:
Dim strHTML As String = "<P>The <B><FONT
size='4'><U>Clipboard</U></FONT></B>" & _
"is <FONT size='5'>Cool!</FONT></P>"
' Place HTML version in DataObject
Dim myDataObject As New DataObject()
myDataObject.SetData(DataFormats.Html, strHTML)
' Now place myDataObject, and thus all formats on the Clipboard
Clipboard.SetDataObject(myDataObject, True)
Can not paste this HTML into Word or Excel.