OneNote: An In-Depth Look at the OneNoteImporter Managed Assembly (Part 5 of 5)

In this series of entries, we're taking an in-depth at the OneNoteImporter manage class, which provides an object model interface for the programmability functionality added in OneNote 2003 SP 1.

Read part one here.

Read part two here.

Read part three here.

Read part four here.

Object Model Maps

The following figures diagram the OneNoteImporter assembly object model, including abstract classes and inheritance. The diagrams mainly document how the objects in the assembly relate to each other. In most cases, when a member takes an object as a parameter, or returns an object, that object is included on the diagram. Value types, such as string or integers, are for the most part not displayed.

For the sake of clarity, the following object information, pertaining to methods that most of the classes have, has been left off the diagrams:

·         The Clone method returns the type of object from which you call it.

·         The Equals method takes a System.Object as a parameter.

·         The GetHashCode method returns a System.Int32 object suitable for use in hashing algorithms and data structures like a hash table.

·         Inheritance from System.Object is not shown.

Figure 2. The Application Object (and Legend)



Figure 3. The ImportNode Abstract Class, and Page Class

Figure 4. The PageObject Abstract Class, and Derived Classes

Figure 5. The OutlineContent Abstract Class, and Derived Classes

Figure 6. The Data Abstract Class, and Derived Classes


The OneNoteImporter managed assembly provides a convenient and multi-functional ‘wrapper’ for working with the SimpleImporter and command line functionality in OneNote 2003 SP1. Moreover, using the provided source files for the assembly, a developer can customize and extend the classes as required for his particular application.

Comments (10)
  1. JT says:

    What did you use to create those object maps?

  2. Is there a list of HTML tags, that OneNote supports?

  3. There isn’t a formal list of HTML tags that OneNote supports as of this moment. Yeah, we suck; we know.

    There are a number of HTML tags that don’t have an isomorphic mapping to OneNote objects (e.g., tables) where we’ll instead do the best that we can to import the data. In addition, there’s also a number of tags (e.g., hr’s) where we’ll just silently ignore the tag. With the infinite set of HTML inputs, we had to do our best with a finite budget — and what you see now is our effort to support the most common cases.

    Is there a particular bit of HTML that’s failing to import correctly? If you take a look at the source code to the OneNoteImporter managed assembly, you’ll see that there’s already a number of workarounds for html tags that weren’t importing correctly on the OneNote side of things. If there’s other troubling inputs, by all means, let me know. (Or feel free to send me a patch to the CleanHtml function. 😉

    Hope this helps,


  4. Andrew May says:

    Hey JT,

    Several people have asked me that same question before, so here’s my answer:

    Thanks for reading.

  5. Currently I’m interested in text alignment. What html tags or styles do I need to align text left, right or middle?

Comments are closed.

Skip to main content