c# - Inserting HTML Into OneNote -
i'm trying transfer information word document onenote document. got html made contents of word document, want take html generated , store onenote file.
i have tried things onenote api , microsoft graph api, there way without using api tools? here code have generating html word document.
    byte[] bytearray = file.readallbytes("greetingfile2.docx");     using (memorystream memorystream = new memorystream())     {         memorystream.write(bytearray, 0, bytearray.length);         using (wordprocessingdocument doc = wordprocessingdocument.open(memorystream, true))         {             htmlconvertersettings settings = new htmlconvertersettings()             {                 pagetitle = "my page title"             };             xelement html = htmlconverter.converttohtml(doc, settings);              file.writealltext("something.html", html.tostringnewlineonattributes());         }     } thanks!
 
 
Comments
Post a Comment