clyx studios

everything clicks with Clyx
welcome to clyx studios       sign in           
in Search

clyx development blog

Managed DataImport Class Library for OneNote

This library is an easy and fun way to integrate OneNote with .NET apps.  We've used it for our freeware Send to OneNote Omea plugin and will be using it with a future product.

The library works well and nicely abstracts the complexity of the OneNote API and XML schema.  For instance, here's how you create a OneNote page with the library:

Page page = new Page(sectionPath, bodySubject); OutlineObject outline = new OutlineObject(); outline.AddContent(new HtmlContent(body)); // adjust for OneNote 2007 margins if (Application.GetVersion().FileMajorPart > 11) outline.Position = new Position(outline.Position.X, outline.Position.Y + 36); page.AddObject(outline); page.Commit();

In the above code, sectionPath contains the full path to the OneNote .one file you wish to use, bodySubject contains the title text for the OneNote page, and body contains HTML-formatted text for the page body.  The margin adjustment is optional and depends on what content you're sending.

Compare that code with the API examples on MSDN.

Another bonus is that the latest version of the library now also supports OneNote 2007, which means you really don't need to think much about what version of OneNote is in use - it just works.

The library is endorsed by Microsoft but was previously only available on a couple of blog posts.  But now it has a permanent home courtesy of Donovan Lange.

We'll have a new release of our Send to OneNote Omea plugin soon which will include the latest version of this library, which means it will also support OneNote 2007.  (If you're really keen, join our community and you'll get access to an early beta release in the downloads section).

Published Monday, August 21, 2006 3:43 PM by Rohan
Filed under: , , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Leave a Comment

(required) 
(optional)
(required) 
Submit