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.
Features
- Display the contents of the current page, in XML form. Changing the page in OneNote will auto-update the XML in DevPal. It does not yet auto-refresh the current page if you make changes in OneNote, but you can get the same effect by navigating away, and then back to your original page.
- Display the current hierarchy in XML form. Changing the current page in OneNote will auto-scroll the hierarchy XML so that the current node is displayed at the top.
- Both XML displays are syntax highlighted specifically for OneNote XML (OneNote start tags, "ID" and "name" attributes, and CDATA text are emphasized)
- Displays the level, name, and object ID for the current page, and each of its parent containers, all the way up (Page, Section, SectionGroup, Notebook)
- Records all events raised by OneNote to the standard debug output. By running a tool like DebugView while using OneNote with DevPal, you can better understand what and when events get raised by the add-in API.
Download
Other Links
If you are doing any OneNote integration, the following links will be helpful:
- Dan Escapa's blog
- What's New for Developers in OneNote 2007 (part 1 - part 2)
Comments
private static void DebugMe()
{
#if DEBUG
System.Diagnostics.Debugger.Launch();
#endif
}
and just call the DebugMe method instead of or while also calling your Output method.
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?...)
Thanks,
Victor
So..nevermind. ((
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?
http://msdn2.microsoft.com/en-us/office/ms406042.aspx
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?