G
Grant Smith
I've got an application that I can copy some text out of the
RichTextBox control. I would like to keep the formatting so I'm able
to copy it to the Clipboard with RTF formatting. I have no trouble
pasting the formatted text into wordpad (which supports RTF formatting)
but it won't paste into notepad (no RTF support). I know that if I
copy something in wordpad with RTF formatting and then paste it into
notepad the text will paste. What am I missing that will let me paste
RTF formatted text into an application that doesn't support RTF
formatting?
Here's the code I have to copy:
Clipboard.SetText(rtxtOutput.SelectedRtf,
TextDataFormat.Rtf);
I've also tried
String spareData = rtxtOutput.SelectedRtf;
DataObject newData = new DataObject(DataFormats.Rtf,
spareData);
Clipboard.SetDataObject(newData, true);
But neither will allow me to paste RTF formatted text into a non-RTF
supported application.
Anyone able to help me?
RichTextBox control. I would like to keep the formatting so I'm able
to copy it to the Clipboard with RTF formatting. I have no trouble
pasting the formatted text into wordpad (which supports RTF formatting)
but it won't paste into notepad (no RTF support). I know that if I
copy something in wordpad with RTF formatting and then paste it into
notepad the text will paste. What am I missing that will let me paste
RTF formatted text into an application that doesn't support RTF
formatting?
Here's the code I have to copy:
Clipboard.SetText(rtxtOutput.SelectedRtf,
TextDataFormat.Rtf);
I've also tried
String spareData = rtxtOutput.SelectedRtf;
DataObject newData = new DataObject(DataFormats.Rtf,
spareData);
Clipboard.SetDataObject(newData, true);
But neither will allow me to paste RTF formatted text into a non-RTF
supported application.
Anyone able to help me?