c# - Parse Microsoft Word Text Add it To OneNote File -


i have came following code:

static void main(string[] args) {     microsoft.office.interop.word.application word = new microsoft.office.interop.word.application();     object miss = system.reflection.missing.value;     object path = @"c:\\users\\t-aaalle\\documents\\testerwordaddin.docx";     object readonly = true;      microsoft.office.interop.word.document docs = word.documents.open(         ref path, ref miss, ref readonly,         ref miss, ref miss, ref miss, ref miss, ref miss, ref miss,         ref miss, ref miss, ref miss, ref miss, ref miss, ref miss);      string totaltext = "";      (int = 0; < docs.paragraphs.count; i++)     {         totaltext += "\r\n" + docs.paragraphs[i + 1].range.text.tostring();     }      console.writeline(totaltext);     console.readline();     docs.close();     word.quit(); } 

currently reads text in microsoft word file, , want able take variable 'totaltext' , have value stored in onenote file. there c# librarys, or classes me in doing this, perhaps stackoverflow posts might have missed?

thanks

your code related reading content of word documents may interesting, unless have problem code entirely irrelevant problem of how access/update onenote notebook.

for that, sounds need api accessing/updating onenote and, fortunately, search term onenote api recognised popular search engines such google. ;)

in case having trouble accessing google reason, link take directly microsoft onenote developer center

if subsequently have trouble achieving need using onenote api post new, specific question problem, if/when arises.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -