onenote

Python MultiPart POST Malformed

烈酒焚心 提交于 2019-12-08 05:45:57
问题 I'm trying to figure out how to write a MultiPart POST request to OneNote using Python. Here is what I've done so far: url = ROOT_URL+"pages" headers = {"Content-Type":"multipart/form-data; boundary=MyAppPartBoundary", "Authorization" : "bearer " + access_token} txt = """--MyAppPartBoundary Content-Disposition:form-data; name="Presentation" Content-type:text/html <!DOCTYPE html> <html> <head> <title>One Note Text</title> </head> <body> <p>Hello OneNote World</p> </body> </html> -

Error “request too large (413)” when trying to upload a PDF file to OneNote

谁说胖子不能爱 提交于 2019-12-08 04:13:59
问题 I'm trying to create new pages in OneNote using Microsoft Graph REST API (Objective-C). Those new pages should contain a PDF document as an attachment. The POST operations succeed with PDF files that are under ~4MB. However, the operations for files that are over 4MB fail with the error message request too large (413) and the following response: { "error": { "code": "BadRequest", "message": "Maximum request length exceeded.", "innerError": { "request-id": "269c663c-9289-47cc-a833-d471b7b867f6

Onenote OCR capabilities in a desktop software

假装没事ソ 提交于 2019-12-07 04:17:05
问题 Is there an API to use Onenote OCR capabilities to recognise text in images automatically? 回答1: If you have OneNote client on the same machine as your program will execute you can create a page in OneNote and insert the image through the COM API. Then you can read the page in XML format which will include the OCR'ed text. You want to use Application.CreateNewPage to create a page Application.UpdatePageContent to insert the image Application.GetPageContent to read the page content and look for

Python MultiPart POST Malformed

爱⌒轻易说出口 提交于 2019-12-06 15:40:51
I'm trying to figure out how to write a MultiPart POST request to OneNote using Python. Here is what I've done so far: url = ROOT_URL+"pages" headers = {"Content-Type":"multipart/form-data; boundary=MyAppPartBoundary", "Authorization" : "bearer " + access_token} txt = """--MyAppPartBoundary Content-Disposition:form-data; name="Presentation" Content-type:text/html <!DOCTYPE html> <html> <head> <title>One Note Text</title> </head> <body> <p>Hello OneNote World</p> </body> </html> --MyAppPartBoundary-- """ session = requests.Session() request = requests.Request(method="POST", headers=headers, url

OneNote Add in: Getting HTML content

依然范特西╮ 提交于 2019-12-05 21:17:09
In the example , code is provided to get RichText. It is able to get the plain text content of the page, but I cannot seem to get it to return the HTML formatted content of the page. For example: Header: A B should be: <p>Header:</p> <ul> <li>A</li> <li>B</li> </ul> However, the example code uses richText/text and only returns Header: . Is it possible to do something like richText/HTML and get the HTML shown above? (Note: I want to use the add-in only, not the OneNote REST API.) Thanks! Code snippet from documentation: OneNote.run(function (context) { // Get the collection of pageContent items

Onenote OCR capabilities in a desktop software

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 08:36:12
Is there an API to use Onenote OCR capabilities to recognise text in images automatically? If you have OneNote client on the same machine as your program will execute you can create a page in OneNote and insert the image through the COM API. Then you can read the page in XML format which will include the OCR'ed text. You want to use Application.CreateNewPage to create a page Application.UpdatePageContent to insert the image Application.GetPageContent to read the page content and look for OCRData and OCRText elements in the XML. OneNote COM API is documented here: http://msdn.microsoft.com/en

OneNote 2013 Add-in won't load. How to debug?

风格不统一 提交于 2019-12-05 04:56:46
问题 I'm following the excellent tutorial by Malte Ahrens on how to create a OneNote add-in. Initially I followed it step by step, making a few changes (just renaming the class, and using my own name and GUID in the assembly) info. As I'm using VS2012 and am not yet ready to hand-roll a WiX installer I manually copied over the built dll to the correct place and also created a registry file to make the requisite entries. I confirmed that they were all there, loaded up OneNote but no add-in, going

Creating new One Note 2010 page from C#

可紊 提交于 2019-12-04 14:32:18
问题 I'm a relative c# amateur, and I'm having trouble getting up to speed with what I guess is Office Interop (correct me if I'm wrong): I want to have a console app that creates a new page in One Note 2010. The new page will always go into the same section, which will already exist. The page title will be a string in the Windows clipboard. I know how to do the clipboard part (the program also creates a folder in a specified path and names it using the string in the clipboard), but I'm having

Is it possible to copy code from Visual Studio and paste formatted code to OneNote?

非 Y 不嫁゛ 提交于 2019-12-04 07:50:09
问题 Is there a way to copy code from visual studio (C#) and paste it into OneNote, without losing the formatting? I was able to do this, but only if I copy from VS, paste to Word, copy from Word, and then paste to OneNote. 回答1: There is fortunately a solution for Visual Studio 2010! Install the Visual Studio 2010 Pro Power Tools extension and copy/paste to OneNote retains syntax highlighting. Made me a happy man;) Jan Roelof 回答2: You have hit the nail on the head on the process. The application

OneNote 2013 Add-in won't load. How to debug?

好久不见. 提交于 2019-12-03 17:14:32
I'm following the excellent tutorial by Malte Ahrens on how to create a OneNote add-in. Initially I followed it step by step, making a few changes (just renaming the class, and using my own name and GUID in the assembly) info. As I'm using VS2012 and am not yet ready to hand-roll a WiX installer I manually copied over the built dll to the correct place and also created a registry file to make the requisite entries. I confirmed that they were all there, loaded up OneNote but no add-in, going to "mange COM addins" section I saw the following error: Load Behavior: Not loaded. A runtime error