A small update to the OneNote Table of Contents Powertoy

    Over the in the OneNote Discussion Group, Mike made this request for a change to the Table of Contents Powertoy:

    "I have downloaded and used the TOC power toy. Again a great thing!
    However, is there any way to make the power toy produce a table of contents
    which reflects the actual order of the pages rather than by the date last
    I know I could force the power toy to do it by manually making a change to
    each page (which can be deleted) in the reverse order that they appear in the
    It would be nice to be able to flip a switch to change the power toy's
    default behavior to this one 🙂

    This brought up a conversation Nani (the creator of the original powertoy) and I had when she was working on the original. I also wanted a table that was unsorted since I believed that I could get more pages listed on the table than the page tabs showed at the right. She thought about it, but decided against implementing that "feature" since it would have distracted from the intent of the powertoy. The "efficiency" you gain from having more rows in the table than in the page tab view is also pretty small - I only get 5 extra rows (up from 35) for a 14% boost. And even then, I had to shrink the font to 8 point and resize some of the columns to get my table to look like this:


    Still, it was nice to see someone else asking for a feature I had proposed, so I added a registry key to control whether you wanted to turn off the sorting by date and simply create a table of the pages which exist in the section. I also fixed a type in the title of the page created - it now says "Table of Contents" (plural).

    The details for the registry key are in the readme.txt file included in the setup. As usual, you can download the new version by clicking the link below my signature at the end of the article, and the new source code is here.

    Mike, I hope this meets your needs!

    Questions, comments, concerns and criticisms always welcome,



Comments (27)

  1. Dave Hejde says:

    Thanks for making this mod to the TOC powertoy!  Using just the last-mod date as the sort criterion wasn’t that helpful to me.

    I installed the powertoy on my Vista64/Office 2007 desktop w no problem. However, I have not been able to install it successfully on my XP SP3-32/Office 2007 tablet.  The powertoy seems to install, but when I double click on the TurnSortOff registry changer, I get a Run verification request and then Notepad opens up with the registry edit commands on it.  The Registry Editor doesn’t open and the turn-off change doesn’t happen.

    Suggestions to make the reg edits occur automatically would be appreciated, as editing the registry is not something I like to do on my own.

    Keep up the great blog!  A reply would be appreciated, since classes are just now starting for me.


    Dave Hejde


  2. JohnGuin says:

    Sounds like the REG files got dis-associated with the registry editor.  try this: Go to start | run and type regedit to open the regedit app.  Click File | Import and import the file.   That should do the trick.  


  3. hyde says:

    This addon didn’t work for me at all until I followed the steps for item #1 on this page: http://blogs.msdn.com/johnguin/archive/2008/03/17/the-3-biggest-pain-points-we-are-investigating.aspx

    Just a note to others that you need to have OneNote configured with .NET Programmability Support enabled in order to use any of these addons.

    Sidenote: Most people won’t have that issue ofcourse because it’s part of the default install, but a standard "system requirements" statement would seem to be in order – Vista or just XP? Version of OneNote? .NET, java, or other code support? Etc. Just my 2 cents.

  4. Caleb says:

    I’m having some trouble using hyperlinks in onenote (links between pages), including those produced using the table of contents powertoy. My problem is that when I click on a that I’ve created between pages, I’m not transferred in between pages within the current section or notebook as I should be. Instead, each time I click a hyperlink windows 7 forces me to open another instance of either the section containing the linked page, or the entire notebook. So, what I’m left with is the very annoying situation of multiple instances of the "same" section/notebook that do not recognize edits between one another. I hope this makes sense. Any help would be appreciated. Thanks, Caleb

  5. JohnGuin says:

    Hi Caleb,

    Which build of Windows 7 do you have?  I’ll assume the beta build (7000).  Can you look through your IE settings to see if you have a setting to always open links in a new window enabled?  I’ll see if we can reproduce this as well.


  6. Caleb says:

    I have the beta build 7022. I checked the IE settings, and links are not set to open into new windows. I don’t use IE, however, but the same settings are true in Firefox.

    I noticed shortly after posting earlier that some of the links I’ve created between pages work as they should. When I mouse over the hypertext of the ones that function correctly on the table of contents page, a file address is displayed–C:Users…#"PAGE NAME". Those that do not function properly show a address beginning with onenote:#section-id…. when moused over;…page title not included. Not sure what that means, perhaps it is more revealing for you.(fingers crossed)

    Here’s two examples of what I see when I right click and view the address:

    Works like I want it to(видеть=page title):


    Does not work like I want it to (Значить is the page title):


    *Side note: You probably recognize that the pg titles are in Cyrillic, so I thought I’d add here that I’ve not changed any of the language settings. In addition, the great bulk of the affected pages do not have Cyrillic titles.*    

    Upon closer inspection, I noticed that all newly created pages(regardless of the method used to create them) in addition to many old ones , possess the latter address and lack pg title in the link address. At the same time, many older pages that were created when I was using XP have the first address and function beautifully—-I never had a problem in XP, save for one instance of a disappearing p2onenote driver solved only by a fresh XP install—(I couldn’t do without it) I thought perhaps my latest problem might be fixed by closing the notebook within OneNote, copying it from within the directory, deleting the one there, and then pasting the copy in the original’s stead. Wishful thinking; it did not work. The difference in addresses seems to be the only commonality between those pages that will not link properly. One other thing I should probably mention is that I attempted to open this notebook in canvas (one of, if not the first attempt at opening this particular notebook on W7; it would not open(nor would any other notebook, existing or newly created for that matter). I never got an error message, only a never-ending loading screen. I have all the .net stuff off the office CD, too btw.  Ironic; the whole reason I got the beta was so that I could play around with canvas 🙂 Anyways, I know that I’ve managed to mess something up here. I only wonder where I caused things to go awry. It seems like there should be an easy fix, but it escapes me. Thank you for the quick response, btw. Oh, and if you have any suggestions for getting Canvas up and running, I’d appreciate those as well. Not to bombard you; one thing at a time and as it permits:) Overall, I must say my OneNote experience has been a fantastic one–it has helped tremendously with my college, as I know it has with many others’. As a research tool, it is simple unrivaled–no contest. So, thanks for helping better an already superb product. You and the other "onenote-ers" are doing a exceptional job; your work, and the excellent product you maintain/innovate is valued and appreciated immensely by the many, many people of whom it has helped greatly. Thanks for your time, and keep up the good work.

  7. Caleb says:

    I spoke too soon once again. Apart from the non-linking pages sharing a similar address, there is another thing. The affected pages lack the little page title box on the top, right hand corner of the page. If I create a new, blank page any links to that page will open multiple instances of its containing section. However, if I enter any text into the title box then the hyperlink address changes, to C: on the mouse-over and all existing links begin to function normally; I can create new ones as well. Also, links created with "create linked page" function as they should.——————-

    Never mind, I just solved my problem..mid-post…

    Those links that did not function led to pages that were created in side note or sent to unfiled notes by other means, and my unfiled notes was using a template that lacked the title box. I have no idea how the template got in place there, if I had changed it, or if that is the default. Anyways, my unfiled notes section was using a template missing the title box, and as such, all pages created through sidenote or "sendto.." would not link properly. Still though, links copied to newly created pages within actual notebook sections open multiple instances of the section–but only when the title box remains blank, furthermore; previously created, malfunctioning links begin to work as they should when text is entered into the empty title box. Placing hyperlinks leading to other pages into the title box of the new page will permit me to then create working links to the new page as well. Placing section links into the title box will also allow working links to the new page. Even a link that opens multiple instances if place as the title of a new page will cause the new page to become linkable. However, placing a link to a page within its own title box has no effect, and all other links to the new page will continue to open multiple instances. Once again, this changes immediately if I enter some other text into the title box. weird… I wonder if the oddity is unique to my setup. I guess I need to go through and add title boxes to those pages lacking them. I had the template powertoy when i was on xp, I’ll download that again and see if it will let be add title boxes without changing page contents. Peace.  

  8. John says:

    Hi Caleb,

    Sidenotes do not show the title box – they are too small by default to "waste" the UI.  Plus, they are designed to show quickly and immediately give you a place to jot down info quickly.


  9. Caleb says:

    I know, and there doesn’t seem to be anyway to change the default page setup in sidenote. I did, however, find a button that adds a title box to an existing page, and in doing so, I can type in a title then hyperlink to that page. It is kind of an annoying extra step though, just so that I can get page links to work.  

  10. JohnGuin says:

    You should also be able to right click on any area of the page and select "Copy hyperlink to this paragraph" and use that as a URL.  The title is optional as a link target.


  11. Caleb says:

    Yes, but that only works with pages that have a title box with text in the title box. If I do that with pages that do not have a title box with text, like the pages made in sidenote, then the hyperlink will open multiple instances of the notebook. The same is true with "copy hyperlink to this page" option.

  12. Helmi says:

    I am using ON 2007 on Win XP pro SP3 on my laptop. I wanted to make a Table of contents with sections>pages>sub pages in that order.

    After I installed the app, I notied that it makes conntents limited to the section you are on and not the entire notebook which I want on the front page. Is this a limit to the software?

    I also noticed that the contents also do not auto sort to what I did, its more like randomly arranging my contents even after installing the regedit sort info.


  13. JohnGuin says:


    Yes, the tool limits itself to the current section.  Performance for the whole notebook can be very painful, so if you want that, you can download the source code and add it!

    Can you define "randomly arranging my contents" a little better?  


  14. yevgeniy says:

    this thing keeps telling me

    "0x200b:Section is read only.

  15. yevgeniy says:

    btw i am using the 2010 one note on an xp inspiron mini

  16. JohnGuin says:

    This is correct behavior.  The addins for 2007 only work with sections in 2007 format.  If you downgrade the section it will work fine.

  17. Damien says:

    John – I find this tool you have created very useful. Are there any plans to upgrade it so that it will support 2010 sections?

  18. JohnGuin says:

    We have plans to update it, but very little time.  I tried to quickly update it but it causes errors with OneNote 2007 format sections…  To be frank, this will take awhile.

  19. John Cronk says:

    Can you put me on the mailing list as to when the OneNote 2010 comes out. It appears you have a pretty large following for this util and relaly this should already be included with OneNote. But I can wait.


    good luck

  20. Mitchell Brin says:

    Is there a simple way to sort a Table in OneNote 2007?  Thanks, Mitchell

  21. John says:

    The sorting addin only works with OneNote 2010.  You could conceivably back port it by removing the ribbon code and using the toolbars if you really wanted.

  22. doug carmichael says:

    same error 7 64 bit onenote 2010"0x200b:Section is read only.

  23. JohnGuin says:

    Where is the section located?  Also, do you have a click to run install of Office?  Click File | Help – what version do you have along the right, and does it mention "Click to Run" there?

    Sorry for the problems.

  24. Brent says:

    Same error for me.  "0x200b: Section is read only".  Using Office 2010.  14.0.6023.1000 (32-bit)

    OS is Win 7 64-bit.

    Would definitely appreciate some help.  This sounds like a very very useful tool for me and my team.

  25. JohnGuin says:

    Brent – what format is the notebook you are using in, and where is it located?  Sometimes a screenshot is worth a thousand words, so if you want to send me one, please feel free to contact me via the link at the upper right and we can start the email process.  Sory for the problems.

  26. Michael Wakefield says:

    Hi John, I'm getting the same error as Brent and doug carmichael. I'm running Windows 7 Enterprise 64-bit and 32-bit Office Pro Plus 2010. OneNote version is 14.0.6106.5005 (32-bit)

Skip to main content