Sample - Custom Sort Notebooks

Description : Sort notebooks by after the first 6 characters of name

Download

Sample - Custom Sort Notebooks

You need Onetastic Add-in
for OneNote to run this macro.
Download Onetastic
Author(s) : Omer Atay
Category : Samples
Last Updated : October 01, 2016
Rating :
(2)
Download(s) : 187
Screenshot :

Sample - Custom Sort Notebooks

No screenshot available for this macro.
Changelog :

October 01, 2016 (D9E3DB) - Omer Atay
Initial version

Comments

Name
Comment
Omer Atay - 2016-10-02
You can specify the sortKey to be an empty string for the one you want at the top. You can check if the 6th character is a dash (-) or not if that satisfies the situation you describe. Something like:
------------------------------------------------------------------------------
If (String_Substring($notebook.nickname, 5, 1) == "-")
      $sortKey = ""
Else
      $sortKey = String_Substring($notebook.nickname, 6, (String_Length($notebook.nickname) - 6))
Array_PushBack($sortKeys, $sortKey)
NicoleC - 2016-10-02
Omer, this is fantastic, thank you so very much!

So now I am getting greedy, but is there also a way to find notebooks that do not start with a number and put them on top?  For instance, I have two notebooks 12345-ABC and Nicole's Notebook.  I would like Nicole's to be at the top and the numbered ones to sort alphabetically under that!

Thank you so much for this one, you have made my life so much easier!