Sort Pages powertoy


Here is another powertoy that I wrote that I wanted to share with you all. What does it do? It will sort any section’s pages into alphabetical order, like this:

Before

After

Steps:

  1. You need to have OneNote 2007 + the .Net Framework 2.0 installed on your machine
  2. Download the file here: OneNote2007SortPages.zip
  3. Install it!
  4. Close and restart OneNote
  5. You will now have a new toolbar button that you can click which will sort the currently viewed section’s pages. The button looks like this:

Notes:

  1. There is NO UNDO! Once you click that button it will sort the pages and you cannot revert the changes so be careful.
  2. You can only sort A-Z, there are no other options.
  3. It sorts by whatever order the .Net Framework believes is correct for your locale. For example sorting in Japanese does not sort by phonetic sounds like it does in Excel (and other Office apps).
  4. For large sections performance isn’t the best, just let it finish and it will eventually get there.
  5. There is no prompt before sorting the pages

As you can see there is still some work that could be done with this but I just didn’t have the time. I hope to post the code soon and then anyone can take it, add whatever options they want and make it a whole lot better.

I wanted to thank Kazuko Hishikawa, a Tester on the OneNote team, for helping me out and finding all of the issues that I just didn’t have time to work out : ) Thanks Kazuko!

Please let me know what you think, I am just excited that I can point this out to my mom since she really wants this feature. If you have problems or questions please let me know in the comments.


Comments (96)

  1. Daniel,

    This addon is SO highly coveted!  I fully plan on using OneNote for my clinical practice, however, I was really concerned about being able to find my patients quickly.  This will be just great (I can sort at the end of every day).

    Suggestions?  Well, maybe an addon like this, but it will automatically take a page that begins with B and place it in the B section (or any other letter).  This will help me find my patient’s names more quickly.

    Thanks!

    erik

  2. This seems to only do pages in a section, not the sections themselves. Since pages in a section are sort of date ordered I don’t really mind their ordering (since I normally need to see the last few pages only), but the sections is the big area where sorting is needed.

    It works very well though on the pages šŸ™‚

  3. Shayne says:

    I can’t get this or the Word Count power toy to work…and it says I already have the .Net Framework 2.0 installed as part of my operating system. And of course, I have the wonderful OneNote 2007.

  4. Rob Bushway says:

    I can’t get the toolbar option to show up at all. It also doesn’t display in my list of add-ins.

    I’m running Vista and OneNote 2007.

    This looks like a great add-in!

  5. Rob Bushway says:

    I rebooted, removed the add-in, and re-ran the setup. worked like a charm. great work. we’ll get this posted up on GBM

  6. Dan Escapa is on a tear releasing a set of new PowerToys for OneNote 2007. What’s going on is that a

  7. EMRHelp says:

    I’d like to be able to right click on a section and select alphabetize.

  8. Barbara Duck says:

    Absolutely great add on.  Great to see the comments from Dr. Erik too with how it helps keep track of his patients!  I have it now on all my tablets with One Note and will use it regularly.  Keep the good stuff coming!  

  9. Do you use OneNote 2007? Check out this powertoy for One Note from Dan Escapa. It sorts tabs in alpha

  10. Due to a busy travel schedule and working on the agenda of Dev & IT-Pro Days 2007 , I haven’t been

  11. John Waller says:

    >>I’d like to be able to right click on a section and select alphabetize.

    Exactly what I’ve been looking for over the past 2 years of using OneNote.

    "Sort pages alphabetically" is great.

    "Sort Sections alphabetically" would be nirvana.

  12. Mark Stuart says:

    This plug-in dies when apply to empty sections. To replicate:

    1. create a new section called test

    2. delete the default page created my One Note

    3. Apply A-Z sorting using plug-in

    OneNote hangs and I get a message about HRESULT appearing in a dialog box.

    Otherwise this plug-in is very useful, so thanks for the effort taken to develop it!

  13. Mark – Looks like you found a bug I didn’t test for.  *sigh* if you want I will be publishing the code so you can fix it up if you want!

  14. confuchsia says:

    .. sort to pages unfortunately refused to work for me on onenote 2007 (with netframework 2.0) as well,  even after uninstalling, rebooting and reinstalling. the same applies to the word count powertoy.

  15. confuchsia – Are you running Windows Vista?  Do you have UAC/LUA turned off?  I have only heard of a problem where people had UAC turned off and you need to reinstall the app and select the "Install for All Users’ option and that seemed to fix up most problems.

    Please let me know if this works for you as well, thanks!

  16. confuchsia says:

    hello descapa. no, i am still running window xp. are the powertoys written specifically for windows vista then?

  17. confuchsia – No the apps are written for both Vista & XP.  I haven’t heard of problems with XP.  Please try a reinstall with the "all users" option turned on.  That is all that I can suggest, hope this works

  18. confuchsia says:

    a reinstall with ‘all users’ option turned on did the trick. thank you descapa.

  19. John Waller says:

    Any luck with tweaking this Sort Pages Powertoy to get a "Sort Sections alphabetically" Powertoy instead?

  20. Ton van der velden says:

    Excellent! I have wanted this feature for so long!

    Now all that i need is a way to collaps all the subpages, so i only see the page level….

    Any ideas?

  21. lullman says:

    Thanks so much for doing this.  I recently bought OneNote 2007 and am hooked, but this was one of the few things I’ve noticed so far that I thought it sorely lacked.  Lack of alphabetizing ability and subpages that don’t stay grouped in moves (This boggles my brain. I have to be doing something wrong) are my top two pet peeves so far – thanks for eliminating one of them!

  22. Ash says:

    Any chance of having similar functionality for OneNote 2003?

  23. No sadly there is no way to do this in OneNote 2003.  The improved API (which enables this) was a new feature in OneNote 2007

  24. Ton says:

    is there a way to collaps all the subpages, so i only see the page level….?

  25. jeff says:

    this is a GREAT feature. For the life of me I can not fathom why a simple SORT feature was not inculded in OneNote in the first place. Does anyone have an idea besides "not high enough priority"? Maybe Microsoft should have put more people on ON rather than the silly Zune.

  26. Andy says:

    This worked great once. Since that initial sort, the button just goes gray and I have to exit onenote for it to stop.

    I highly recommend people DON’T install this.

  27. John Jameson says:

    Wow! I am responsible for vendor management and the ability to keep my notes sorted by vendor is a great boost to my work!!

  28. It’s getting hard to keep blogging about OneNote in detail now that I am no longer on the team, but I

  29. Li-fan Chen says:

    I tried it (XP Pro and Office 2007 Ultimate with the Install for Everyone option. After reboots and reinstalls nothing. It doesn’t work. It gets dumped into the Program Files. A dll and a bmp shows up. That’s it though.

  30. Ben says:

    Hi,

    Can any-one help? Using XP, Onenote 2007 and .net 2.0 and installed sort pages for everyone but pages sort does not work. Button appears. Click once nothing happens and then goes greyed out. Any-one got any ideas?

    Ben

  31. Ben says:

    Hi,

    I was also having problems with sort pages not working as posted, but found the solution. Although I had .net 2.0 installed, xp etc. when onenote 2007 was originally installed it did not install .net Programmability Support by default. all you need to do is add that installation option to run from the computer by adding the feature from your onenote office disks and all works fine.Hope this helps.

  32. Anirudh says:

    hi dan,

    are you releasing the code for this? It would be of help if you did.

    Thanks,

    Anirudh

  33. Hoyt Nelson says:

    I’d like to modify the code so it examines the existing sort order and reverses it — so you can sort A-Z then Z-A by applying it twice. The sort order would be determined by examining the first two pages.

    Is the source available, please?

  34. StanLee says:

    On occasion my Vista Windows Mobile Device Center just…well.. doesn’t recognize the device and a new partnership has to be created.  This creates a second OneNote Mobile section called "DeviceName_2".  Although the mobile  device sorts the pages, the local App doesn’t… or at least it didn’t before I downloaded this app.

    I really… appreciate… your time… you certainly saved me a bunch of time.

    Thanks again..

  35. jim says:

    this is great. any chance for a similar powertoy to sort lines in a table?

  36. A few astute readers pointed out I (intentionally) missed a few addins the OneNote team finished last

  37. Peter says:

    This is nice, but a "sort by date" button would be godlike.

    Could this be realized?

  38. Ben says:

    Awesome!  30 seconds to download, install, and use.

  39. Ton says:

    Is there a way to collaps all the subpages, so i only see the page level?

    Any ideas?

    Thanks,

    Ton

  40. I would greatly appreciated, if Sort Pages powertoy not only alhpabetically, but also by creation/modification time.

  41. If you don't know I am a HUGE OneNote fan and have converted countless people from using Notepad

  42. Fred says:

    Is it possible to get Sort Pages powertoy to sort in reverse order as well?  Like instead of sorting dates from 1990 to 2008, sort them from 2008 to 1990?

    This would be a great help.

  43. Clint says:

    Any possibility of a power toy to sort a OneNote table by a particular column?

  44. Ton says:

    Is there a way to collaps all the subpages, so i only see the page level?

    puhlease?

  45. JK says:

    I simply cannot figure out why you would not add in a plethora of sorting options.  Learning the API and such is the ‘hard’ part, not basic sorting.

    Even more puzzling is that you haven’t posted the source code yet (or at least not in an obvious location).

    Correct me about the source code?  Either way I’ll probably just end up doing it all myself.  I just can’t understand how so many people seem to actively minimize the beneficial impact their contributions have (though it would have been worse had you never tried or just kept it to yourself…).

  46. Ash Haque says:

    Doesn’t work for me; Onenote 2007

    Clicking the link doesn’t do anything except making the button go grey on the toolbar šŸ™

  47. Ash Haque says:

    EDIT: Reread the comments, your tip about installing it for everyone instead of just for me worked great!

    Thanks for the awesome powertoy

  48. Mark says:

    Awesome!

    I have been looking for something that does EXACTLY what your powertoy does!

    Thank you.

  49. Roland Openshaw says:

    Just fantastic – a great help.

    No if I could just find a way of sorting tables…

  50. RDYW88 says:

    hi, does this work on Vista 64 bit?  I’ve had such bad luck with installing utilities and apps, I’d really appreciate a yea or nay before I even try.

    Thanks!

  51. Rainer says:

    Hello Daniel,

    thank you very much for this! I have been missing this function in OneNote, because I always want to keep the current projects of my "Getting Things Done" notebook sorted. Thanks to you, I don’t have to do that manually any more.

    Very useful!

    Kind regards,

    Rainer

  52. Lyle says:

    How about a sort by table column? It would be so nice to be able to sort a table by one of the columns. Sorting in Word/Excel and pasting it back is so much of a pain.

  53. Paul says:

    This is exactly what I have been searching for. Why on earth doesn’t Microsoft have this feature in OneNote already? Send it to ’em!

  54. Mark Jordan says:

    I know that you’ve been asked several times if you will be releasing your source code, and you’ve indicate in the Sort Sections blog post that you would soon be doing so. Is that still going to happen?

    I want to make a couple of enhancements to your logic (ie. sort by date) and contribute it back to the community. Truth be told, I already pushed your bits through Reflector, dissassembled to source code, and got it building and functioning; of course, I’m not at all comfortable releasing my results to the community based on your work without your permission.

    The source could be very helpful for others trying to write similar types of functions for their onenote environments. I, for one, would give full credit to your origination if a subsequent release of an enhancement is submitted to the community.

    Thanks for considering.

  55. OnenoteR says:

    The idea is good but the method is still to be optimized. It doesn’t install/uninstall properly.

    I hope that I will not lose any section or pages in onenote

  56. Kathy says:

    I’m a complete non-techie…..lots of comments in this blog made no sense to me…but this worked beautifully, even for me!  Had wanted a way to sort recipes and was considering making multiple sections, but this is so much easier.  Thanks for sharing your expertise!

  57. I use Microsoft OneNote a lot for notes, tasks, projects, reference, etc.  One of the addins that

  58. When will the source become available?

    I’d like a sort by date function for times when I combine sections

  59. Hoyt Nelson says:

    Source code?!?! PLEASE! What’s up with that?

    I too want to be able to sort by date.

    If you’re not gonna publish the source code — OK, that’s your decision, but tells us, so we don’t keep coming back here wondering if it’s happened.

    Thanks, Hoyt

  60. Ted says:

    This looks promising, but the link is broken! I can’t download the Sort Pages powertoy.  Will it ever be available again?

  61. Craig says:

    I use a Vista-64 system and can’t get it to even show up on the tool bar (installed for myself or for everyone’s use).  Any suggestions?

    Note, please see http://blogs.msdn.com/johnguin/archive/2007/08/16/merge-pages-in-onenote-powertoy.aspx for a tool to merge pages (and subpages).

  62. Karen says:

    YAY!!!!!  Thanks for the amazing tool.  I’m shocked they didn’t include it in the first place.  I haven’t read all the comments, but I didn’t think my download worked — until I had to find the icon hidden on the tool bar.

    Thank you VERY much.

  63. Kathryn says:

    A really useful tool – just what I’ve needed since I started using OneNote!

    Thank-you so much!

  64. Carolyn Griffin says:

    THANK YOU!!!  Would love to see this let me have my choice of sort order – alpha, creation date or last edit date.

    YOU ARE THE BEST!!!!!!

  65. Ardeet says:

    Daniel,

    Thank you very much for this utility. I still find it hard to believe that it’s not standard with OneNote.

    Good effort!

  66. Rick Hantz says:

    Running Win 7 64bit and OneNote 2007.

    Sort btn does not appear.

    I ran setup as administrator and chose everyone…

    Any suggestions?

    Shipping OneNote without sorting is almost as bad as shipping several versions of ClickOnce without the ability to install the application, just the prereqs and assemblies..

  67. Shane Cusson says:

    Is there an update for OneNote 2010 beta?

  68. Jon says:

    Hey, great job! Easy to install and works well!

  69. massimo says:

    Not working on 2010Beta.

    i get an error on hierarcy.

    Can you fix it please?

  70. Bill McLachlan says:

    I get the same error – Could not updateHierachy from OneNote.  Error code Exception from HResult:0x8004200B

  71. Ondrayah says:

    Good morning,

    I was thrilled to find this PowerToy, then crushed again when I realized that my OneNote 2010 on Server 2008 R2 x64 workstation doesn’t support the ‘legacy’ add-in.  Please add my voice to those clamoring for an update. Thanks so much!

    Ondrayah

  72. Brian Engle says:

    Icon unavailable after install on Win7 Pro 64 bit. Afterthought. Am stunned by the lack of common sense features in OneNote and the excuses offered by MS employees that basically stem from "I'm overworked and have to cobble non-sanctioned patches together during my vacation time". Simply sad to see a corporate culture prevent such a promising product from going the distance.

  73. Kate says:

    Does this work for 2010? If not is it being rewritten for 2010 and when wil it be done?

  74. Matt Hudgens-Haney says:

    Great addin! I would also love to have this for Win7 64bit. Just FYI, I get an "unsuccessful installation" and get the following message when I press the Sort Pages button:

    "Could not UpdateHierachy from OneNote. Error code: Exception from HRESULT: 0x8004200B"

    Attempting a repair installation does not solve the problem.

    Thanks Daniel. I'm a new OneNote user (Just got a tablet PC), & your site has been very helpful!

  75. mars373 says:

    How did I not know about this for 3 years. Great job! A hearty thanks.

  76. Liam says:

    Great addon but don't why it was not already there in the first place? I thought MS would invest more in Onenote 2007 and 10. Same goes for full word excel integration (not attached files).

  77. Laura says:

    Wow, this worked terrifically. I have well over 80 pages for work in my notebook and was SO tired of dragging them around manually.. I was a bit nervous downloading an unknown program but I have to give you judos. It's quick and efficient and simple. šŸ™‚

  78. RockSpot says:

    Any chance you'll update this for 2010?  It apparently works on notebooks created in 2007 and used in 2010 … but won't work on workbook created within 2010.  All I get is an error:  "Could not UpdateHierachy from OneNote. Error code: Exception from HRESULT: 0x8004200B"

  79. Anthony says:

    Its amazing this product has lasted this long, OneNote that is.  No API reference, no programming samples, no automation documentation and this thing has been around since 2003?  Is it the red-headed step-kid or something?

  80. Bill says:

    THANKS so MUCH.. THIS IS like so COOL

  81. «¤¤XTÄā‚¬Y¤¤» says:

    ANYBODY Find a fix for this? looking to build a website, and want to use onenote as our scratch pad, and need our pages sorted alphabetically….

    getting the same error –  "Could not UpdateHierachy from OneNote. Error code: Exception from HRESULT: 0x8004200B"

  82. philrob says:

    Hi…I've installed the powertoy for all users and restarted onenote, but there is not any icon/toolback icon displayed.  Is there a way to force this to work?  I'm using OneNote 2007 on Win2008 server.

  83. HY says:

    This version of add-in doesn't seem to work in OneNote2010… Thanks

  84. Renske says:

    So happy! Came across your tool and it works great! This is what I needed!

  85. Malcolm says:

    Thanks so much.  Such a useful tool.

  86. jo says:

    thank you!  i have been using onenote for a while now and this has been a serious pet peeve.  You fixed it!

  87. David says:

    This powertoy is awesome.. even works in onenote 2010 šŸ™‚

    Thank-you so much – my manager spent ages sorting out the pages.. now I can do it in a click lol

  88. Keith says:

    Daniel, I have come across the possibility that once pages are alpha sorted in OneNote 2010, that section will no longer synchronise with OneNote on the iPad (via Skydrive). Duplicating the section will not work either. The only workaround is to manually copy every page into a new section.

  89. Diane Smith says:

    I am running Vista and do not have Framework installed. I really want the sort pages file – is there another way I can download it?

  90. John Wayne says:

    Hello. Your file  OneNote2007SortPages.zip has disappeared from the internet. Is this intentional? If not, would be very grateful if you can make it available for download again please. Thanks alot. The link provided is dead.

  91. John Wayne says:

    Hi guys. For those interested in getting the actual file, you might have found out the link provided above actually is a dead link.  I have notified the author. In the mean time here is an alternative download:

    windowssecrets.com/…/130497-OneNote-2007-Sorting-Pages

  92. bruce says:

    This particular blog is really awesome as well as informative. I have picked up a lot of handy things out of this amazing blog. Iā€™d love to come back over and over again. Thanks!

    <a href="http://www.cafeios.net/…/a&gt;

  93. Ruth says:

    The site is no longer there. I am trying to alphabetise OneNote

  94. gems says:

    It's really annoying we have to download a tool to sort pages in OneNote!!  besides, it's not there anymore.

  95. Cobie says:

    Can't find the file, "OneNote2007SortPages.zip".

    Link will not work.