简体   繁体   中英

OneNote (.one) format to RichTextBox (RTF) C#

I need help with one problem. I have to take the text from OneNote file in Clipboard or with some other shortcut or with one mouse click and insert it to RichTextBox in Visual Studio.

Only problem is that if I copy the text to RichTexBox, there is a special frame left in RichTexBox Window, so i couldn't work with the text. This frame is a note from OneNote file, because if you want to contribute to OneNote file, you have to insert this note and there is no other possibility how to write a text, am I right?

This problem could be solved by copying to MS Word (the frame disappears) and after that by using of a new copy of the text (from MS Word) and pasting it to RichTextBox in VS. I need to do that somehow in one step.

Could you please give me some tips how to do that? I need to work parse the text (rich text) in C# and convert it.

PS: Sorry for my English.

If you want to parse text in .one file you can use Application Interface of Onenote. By using this you can read the onenote page(XML output) and parse as you want. Application Interface 2013 .

Page content: http://pastebin.com/acgaBSe3

Where Page is: 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM