Fast Table of Contents and New Macro Icons

December 28, 2016

Some of the most popular macros in Macroland are the Table of Contents (TOC) macros. They are very useful in getting a hierarchical list of all the pages in a sections or notebook with back links to each page. However for a large notebook generating a TOC could take a long time. Most of this time is spent on generating the hyperlinks for each page. OneNote's API requires requesting hyperlinks for each page one by one and this is very slow. The hyperlink generated by OneNote is resilient to changes, so that even if the page's title is changed or the page is moved between sections, it can still find it. All TOC macros are updated with a fast option that will generate links without this resiliency. This can complete in a few seconds, whereas it would take minutes on the slow but resilient mode.

The TOC macros are also updated with an option to update the existing TOC on the current page instead of creating a new page, another common request. The dialog for TOC in Current Notebook macro looks like this:

TOC in Current Notebook macro dialog

Finally a new macro is added to the TOC category: TOC in All Notebooks. This is now made practical with the Fast option if you have lots of notes.

New Macro Icons

When you have too many macros, it may be hard to distinguish them if they all have the same icon. For instance your ribbon may look like below:

Old Macro Icons

You can see that some categories like Find and Sort have specific icons, but many others don't. Macroland now has more than 40 categories and only a handful had specific icons. With the latest update, most of these categories now have specific icons to help distinguish them. Now the same ribbon will look like this:

New Macro Icons

You can find all the new icons below:

All New Macro Icons

Enjoy the update with the new icons, which also comes with some bug fixes and new macros.

Bug Fixes

Show Page XML can't show very long XML

When the page contained lots of content, Show Page XML window was unable to display the page XML. This is now fixed.

Select Text from Image has problem in high DPI

Select Text from Image utility failed to detect the text boundaries correctly on high DPI screens after last update, which should no longer be an issue.

Macro Updates

Following macros in Macroland are updated:

TOC in Current Section

Added options for Fast vs Resilient link mode and ability to update existing TOC page.

TOC in Current Notebook

Added options for Fast vs Resilient link mode and ability to update existing TOC page.

Tag Summary for Specific Tag

This macro can now search up to three tags to find paragraphs that have all of the given tags. Also the tag name is now free form text box so that custom tags or tags in other languages can be searched.

Tag Summary with Page Names

Orders the results first by tag, then by the page they appear in.

Diary Pages

Fixed an issue where the day of the week would be incorrect

Sort Pages By Date

Added option to run the macro in all sections of the current notebook

Extract highlighted Text

Fixed it to correctly extract only the highlighted text. Also now keeps the highlight color in the extracted text.

Tag Summary for Specific Tag

Updated to look for every tag on a paragraph in case it has multiple tags. Previously it only used the first tag on a paragraph.

New Macros

Several new macros have been added to Macroland since the last update. Check them out:

TOC in All Notebooks

Creates a new page with table of contents of all notebooks

Super Color

A macro to change the color of the current page, all pages in current section, current section, all sections in current section group or notebook and the current notebook

Insert Dated Page with Section

Inserts a new page with title as date and section name. Update to 'Insert Dated Page at the Top' to append the section name at the end of the title as well. Also add's the page to the bottom of the section rather than at the top.

Insert User Comment

Insert a Text comment highlighted at end of current paragraph with author's initials

Insert page Title at Cursor

Inserts current page title + " - " at cursor

Custom Grid Lines

Set spacing and color of grid lines to any value.


Chris - 2019-05-01
Omer, Onetastic is truly fantastic. Is it possible to change the icon of the macros? I like the existing one, but I use quick access bar and not ribbon. I usually have ribbon minimized using 'Show Tabs' option. In the Quick Access bar the macro icon are hardly distinguishable.

Can you please provide a way to have our own icons?
Omer Atay - 2017-02-28
Anonymous: Please e-mail for troubleshooting your installation.

Caliesota: You can use the "Sort Paragraphs by Highlight Color" macro to sort the results of extracted text. See:
Caliesota - 2017-02-28
Hi! First off, I'm really loving the added usability of Onenote when combined with Onetastic. Especially the 'extract highlights' macro. It's (almost) exactly what I needed!

I'm wondering if there's a way to then sort the extracted highlights by color?

I spent some time with the 'how to write a macro' pages but I can't figure it out.

Any hints or help is greatly appreciated!

Other Posts

Show all posts