Copy from Word Word and paste into Rich Textbox problem

I have a problem inserting ms word into richtextbox.

when I copy the contents of a text document and paste it into a richtextbox, which is in a Windows application written in C #. links are shown like this:

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

A problem can also be created by loading an RTF from a word into a saved document.

How can I fix this, please help ..

early.

+6
copy-paste ms-word richtextbox
source share
3 answers

The problem is that you are not actually copying RTF to the clipboard from Word. Well, sort of, but not the same RTF that only displayed formatted text and would have a hyperlink behind it. You will need to handle the insert event and do your own analysis and reformatting to achieve this.

+5
source share

Some richtextbox editors have a Paste from Word feature. You can paste it into a simple text box and start reformatting based on the rich text editor you use.

+1
source share

This behavior has nothing to do with Word. In fact, although the RTF created in Clipboard from MS Word is slightly different from the OpenOffice results, the results are identical. See the screenshot below, where the top two links belong to MS Word and the rest is from OOo 3.2.

alt text .

This seems to be a feature in drawing hyperlinks in Winforms RichTextBox. I do not see a quick workaround to change this behavior.

+1
source share

All Articles