R – Copy from Ms Word and paste into Rich Textbox problem

copy/pastems-wordrichtextbox

I have a problem when pasting ms word content into richtextbox.

when I copy content of word document and paste it into richtextbox which is in a windows application written in C#.
the links are shown like that ;

This is test.. Go to Google. <http://www.google.com>
Mail : Project <mailto:cbn@test.com>

The issue can also be created by loading in an saved RTF document from word.

How can I correct this, please help..

thanks in advance.

Best Answer

The issue here is that you're not actually copying RTF into the clipboard from Word. Well, kind of, but not the same RTF that would display just the formatted text and have a hyperlink behind it. You'd have to handle the paste event and do your own parsing and reformatting to achieve that.