@Dirk Vatterott , thanks for the feedback, based on my test, I reproduced your problem.
We need to use DataFormats.UnicodeText when we paste the format from OneNote to richtextbox.
If you want to paste the format from the OneNote to Richtextbox and show the paste text, you could try the following code:
internal void DoPasteAction(RichTextBox textBox)
{
DataFormats.Format myFormat = DataFormats.GetFormat(DataFormats.UnicodeText);
if (richTextBox1.CanPaste(myFormat))
{
richTextBox1.Paste();
string insertText = Clipboard.GetText();
MessageBox.Show(insertText);
}
}
Result:
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.