A treeview control for OneNote 2007


While cleaning out my email a short while ago, I found a tree view control for OneNote 2007 I had built as its own standalone project. This is the same control I use in the text importer and other tools. I had forgotten I had it as its own project and thought I should go ahead and give it out. So here you go!

I had let the OneNote team know about this via email, and here’s the message I sent:

Say gang,

Here’s a tree control for ON.  Loads the XML hierarchy and populates the nodes based on the notebooks, sections and page names.

If anyone thinks this is useful, I’ll try to rebuild it as an ActiveX control to make it a little easier to use overall.  If not, have fun.

It’s kind of odd to see this now. I did this shortly after I came to the OneNote team – nowadays I would post something like this in a shared notebook. This could get thrown into the “blast from the past category.” It’s also nice to be able to point to something for OneNote 2007.

Enjoy!

Questions, comments, concerns and criticisms always welcome,

John

treecontrol.zip


Comments (11)

  1. Michelle says:

    This relates to an earlier post of yours. You mentioned that Ctrl+Shift+T would create a linked page in OneNote 2007. In OneNote 2010, Ctrl+Shift+T now goes to the page title. The other day, I accidentally created a linked page in ON 2010 with some obscure keystroke that I can't duplicate. Do you know what that keystroke is? (I know you can type [[ ]] around new text. but I'd like the shortcut.)  Thanks!

  2. John says:

    CTRL+ALT+K with 2 lines of text (technically, multiple outline elements) selected?

    Just guessing…

  3. lnf says:

    thanks. i'm always looking for cool things for OneNote. what should i do with this zip file?

    thanks.

  4. Michelle says:

    Yes, CTRL+ALT+K with multiple lines selected worked. Thanks!

  5. Jason says:

    Will this work on OneNote 2010?

  6. John says:

    No need for this in 2010 (but it would work if you recompiled).  2010 has a quick filing dialog:  msdn.microsoft.com/…/ff966471.aspx

  7. Day Late, Dollar Short says:

    But I'm using OneNote 2007 and downloaded the zip file and extracted it to a folder, but there I stopped because I can figure out how to install it. Any advice would be appreciated.

  8. Day Late says:

    Sorry, meant to say, 'I can't figure out how to install it.'

  9. John says:

    There is nothing to install here – it's just code that shows your notebooks and sections in a treeview control in case you want to write your own addin.

    I used it a few times and thought it may be useful just to share as is.  Sorry for any confusion.

  10. Add treeview in notebook says:

    I have a large data set that would work well in XML and would like to add to onenote. Are there any addins for 2010 that will add a treeview control into 2010?

  11. John says:

    OneNote 2010 has a much better dialog class built in that you can use – the Quick Filing dialog.  Documentation is here: msdn.microsoft.com/…/ff966471(v=office.14).aspx

    This code will still work, though, if you update the namespace to 2010.  But the dialog we provide is faster, more error resistant and has, in my opinion, a much better UI.  Give it a try!