TOC in Current Page

Description : Creates a table of contents from heading in the current page and inserts at the top of the page. Optionally it adds "Back to Top" links to the headings.


TOC in Current Page

You need Onetastic Add-in
for OneNote to run this macro.
Download Onetastic
Author(s) : Omer Atay
Category : TOC
Last Updated : September 04, 2016
Rating :
Download(s) : 21574
Screenshot :

TOC in Current Page

Changelog :

September 04, 2016 (157AED) - Omer Atay
Now finds all the headers in the page, even if they are in a table.

August 16, 2016 (C55DB0) - Omer Atay
Re-added the option for "Back to Top" links, which was lost in the previous update.

July 30, 2016 (A20BF1) - Omer Atay
TOC now uses indents based on heading level so that it can be collapsed

June 20, 2016 (E0E260) - Omer Atay
Re-written with the new Macro Language to take advantage of cleaner syntax and performance improvements

These versions are no longer supported:

July 24, 2014 - Omer Atay
Added the option for "Back to Top" links.

March 17, 2013 - Omer Atay
Initial version


Omer Atay - 2017-09-15
Freddy: Please send a page that has the issue to
Freddy - 2017-09-15
On some pages the TOC can't be created. An error "The ink can't be inserted" occurs.
Can't figure out the reason. Already deleted all formats before defining the headers which do not contain ink/handwriting.
Sparks In Texas - 2017-07-15
Is it possible to create TOC at the top of the page using tags instead of headings?

Or is it possible to find/replace a specific tag with a heading?

Or, find/replace a specific word with a heading?

When I'm typing during class it is too hard to click CTRL-ALT-1 or CTRL-ALT-2 and yet I need a TOC at the top of each page so I can quickly scan pages to find information. Right now I type ttt1 or ttt2 and then use your "search & tag" to replace with a TOC1 or TOC2 tag. However, I can't get those to the top of the page to create a TOC because "tag summary for specific tag" only works at the section level.