.Net Clipboard.SetText and TextDataFormat.Html

Here’s something that I recently discovered. When calling Clipboard.SetText with the TextDataFormat set to Html, I encountered an issue – an exception being thrown because the text being put onto the clipboard was not in the correct format. It turns out there’s a bit more to setting Html text to the clipboard than just setting the TextDataFormat. I came across this post that describes things in more detail.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s