Article Index

OneNote DevPal

Introducing OneNote DevPal

OneNote DevPal is an add-in for Microsoft OneNote 2007 targeted at developers interested in OneNote extensibility. My goal was twofold: provide a source code example of how to create a OneNote add-in for developers just starting out, and then provide the tool itself that will aid in any OneNote integration development.

The add-in was created by following the very helpful guide provided by Dan Escapa. I would advise anyone just starting out to read that first.

The add-in itself is an equivalent to the "view source" function of a web browser. It allows you to inspect the XML that corresponds with the page you are currently viewing in OneNote. After installing the add-in, you will have a "DevPal" button on your OneNote toolbar. When you click the button, the OneNote DevPal window will open and display useful information related to the current page. If you navigate to a different page in OneNote, DevPal will automatically update to reflect the current page (after a slight delay). If you are integrating with OneNote and don't know their XML schema off the top of your head, you will quickly realize how helpful this tool is. For example, if you want to know how a bulleted list in OneNote is represented in XML, just create a bulleted list in a OneNote page, and then click the DevPal button to view the XML source.

Alternately, you can view the XML representation of your OneNote hierarchy. This is very useful if you want to programmatically add new pages, sections or notebooks using the UpdateHierarchy API method.



Other Links

If you are doing any OneNote integration, the following links will be helpful:


A nice enhancement to your code is the ability to break into a debugger, you can do it this way:

private static void DebugMe()

and just call the DebugMe method instead of or while also calling your Output method.
Blair - February 11, 2007 12:29pm
Great example! It help me figure a lot of the problems I was having with Dan's example.
superbovine - February 14, 2007 08:52am
Great tool.

Joshua, do you know if there is a way to get/convert to similar XML the content from OneNote07 ".one" file(s)?
(I need to integrate plenty of .one content (on a shares) into our DMS systems, but have only packaged files. Have anyone done this before?...)

Victor CG Erofeev - May 05, 2007 08:37am
Victor - I'm not sure I understand your question. Are you trying to extract the information from .one files? That is exactly what this tools enables (or at least, helps you build a tool to do the job). You do not interact directly with the .one files, you interact with the content via the OneNote API. The tool that you write (using OneNote DevPal), would run the OneNote application, and query for the content/pages that you want to extract, and then publish the XML in whatever format you need.
Joshua Flanagan - May 06, 2007 07:34pm
Okay, thanks... I wonder if there is a way to extract data _without_ OneNote API, directly from files. Just in the same way as Office XML formats.
So..nevermind. ((
Victor CG Erofeev - May 11, 2007 01:33am
I have been searching for the OneNote API or SDK download. I have tried and no luck.

I guess I should ask a few people who are already developing application with the api. Where do you obtain it and how can I get it?
Jason Heithoff - July 27, 2007 02:35pm
Jason - There is no documentation download that I know of - the MSDN site you reference (and Dan Escapa's site) have all you need. There is no separate tool/code download required for development - you just need OneNote 2007 installed, and then you can add a reference to the library as described in this article:
Joshua Flanagan - July 27, 2007 05:43pm
Thank you very much. I found the extra stuff in the install. I had to reboot the computer but its all working now. This is a great article thank you again.
Jason Heithoff - July 29, 2007 10:18pm
"After installing the add-in, you will have a "DevPal" button on your OneNote toolbar."

I installed the add-in but I don't see any button. There is no add-in listed in Tools/Options/Add-Ins/Installed OneNote add-ins.

Any ideas?
Hector C. - August 13, 2007 11:17pm
Thanks the tool was really helpful
Commonman - September 18, 2007 05:30am
We've installed DevPal on a Tablet, Notebook and Desktop PC. All are running OneNote 2007. The PC is the only machine where DevPal works. The buttons are present on the Notebook and Tablet and the add-in shows as enabled but the DevPal button remains greyed out no matter what we do with OneNote's notebooks, sections and pages. Any ideas please?
Roger G. - May 21, 2008 03:09pm