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.


mamun - 2017-02-25
Has anybody noticed that "no spell check" macro removes all the equations typed in using OneNote's equation editor (by pressing Alt+=)? Is there any solution to this problem?
Tony - 2017-02-24
How come I hadn't found OneTastic before?  This is a very useful add-in because many of its features are geared to more efficient workflow and not just to pretty it up.  I truly like the calendar and some of the macros (eg alphabetizing pages).  This really makes OneNote an Evernote killer,
Thank you, both for writing this and for letting us use it free.  Will it form part of the main OneNote product at some stage?
Martin - 2017-02-24

i just tried the sort macro it works fine - but i habe a list of words in a table that must be sorted by row (over all rows) and not by column - is there already a solution thank you Martin

Other Posts

Show all posts

DISCLAIMER: The opinions and views expressed in this website are those of the author and do not necessarily state or reflect those of Microsoft.