Onetastic
Home
Macroland
Blog
OneCalendar
Pricing
How To
Login
Download
Go to Macroland Home
Sample - Custom Sort Notebooks
Sort notebooks by after the first 6 characters of name
Download
Sample - Custom Sort Notebooks
If this didn't work,
get help
downloading this macro
Author(s)
:
Onetastic ★
Category
:
Samples
Last Updated
:
October 01, 2016
Requirements
:
OneNote 2010 or above
Changelog
:
October 01, 2016
(D9E3DB)
-
Onetastic ★
Initial Version
Comments
Name
E-mail me if someone replies
Comment
Send Feedback
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!
Related Macros
Sample - Insert All Bullet Typ...
Sample - Insert Styled Paragra...
Sample - Insert Bold Text Then...
Sample Create Section Hierarch...
Sample Insert Text
Sample - Move Last Row To Top
Sample - Insert Tags
Sample - Create tables
Sample - Create a new page
Sample Notebook/Section/Page P...
See all other macros
Macros by This Author
Insert Monthly Calendar
Sort Pages
TOC in Current Notebook
Search & Replace
TOC in Current Page
Weekly Planner
Insert Horizontal Line
Monthly Calendar With Task Lis...
TOC in Current Section
Resize Images
Sort Sections
Sort Pages by Date
Daily Planner Page
Sort Notebooks
Weekly Planner for each day wi...
Insert Yearly Calendar
Function
Blackboard page
Word Count
Show More