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:

Thursday, February 01, 2007 7:33:23 PM (Central Standard Time, UTC-06:00) #    Comments [11]  | 

 

Sunday, February 11, 2007 2:27:55 PM (Central Standard Time, UTC-06:00)
A nice enhancement to your code is the ability to break into a debugger, you can do it this way:

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.
Wednesday, February 14, 2007 10:45:22 AM (Central Standard Time, UTC-06:00)
Great example! It help me figure a lot of the problems I was having with Dan's example.
superbovine
Saturday, May 05, 2007 10:33:48 AM (Central Daylight Time, UTC-05:00)
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?...)

Thanks,
Victor
Sunday, May 06, 2007 9:18:35 PM (Central Daylight Time, UTC-05:00)
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.
Friday, May 11, 2007 3:30:12 AM (Central Daylight Time, UTC-05:00)
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. ((
Friday, July 27, 2007 4:20:53 PM (Central Daylight Time, UTC-05:00)
I have been searching for the OneNote API or SDK download. I have tried http://msdn2.microsoft.com/en-us/office/aa905452.aspx 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?
Friday, July 27, 2007 7:29:53 PM (Central Daylight Time, UTC-05:00)
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:
http://msdn2.microsoft.com/en-us/office/ms406042.aspx
Monday, July 30, 2007 12:01:58 AM (Central Daylight Time, UTC-05:00)
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.
Tuesday, August 14, 2007 1:05:36 AM (Central Daylight Time, UTC-05:00)
"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?
Tuesday, September 18, 2007 7:21:40 AM (Central Daylight Time, UTC-05:00)
Thanks the tool was really helpful
Wednesday, May 21, 2008 5:05:57 PM (Central Daylight Time, UTC-05:00)
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?
Comments are closed.
All content © 2010, josh
About this site
Send mail to the author(s) Contact me
Feed your aggregator (RSS 2.0)
Joshua Flanagan
I am a software developer focused on continuous improvement in the .NET community
Los Techies

On this page
Archives
Rest of the world

Acknowledgements

Powered by: newtelligence dasBlog 2.1.8209.14743

Special thanks to LosTechies.com

Site theme based on the essence design by Jelle Druyts

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.