Expand/Collapse Outlines

Toggle Expand/Collapse, or expand to the selected outlines to the chosen level (Level 1 to 9 as well as all levels).

Download

Author(s) : Chris K.Y. FUNG
Category : Outlining
Last Updated : June 19, 2016
Requirements : OneNote 2010 or above
Screenshot :

Expand/Collapse Outlines

Level
* Collapse = 1
or use default shortcut key ALT+SHIFT+ [1-0]
Changelog :

June 19, 2016 (13FC1A) - Chris K.Y. FUNG
Automatically upgraded to the new Macro Language

These versions are no longer supported:

July 22, 2014 - Chris K.Y. FUNG
Initial version

Comments

Name
Comment
Dan - 2017-01-22
Thank you Omer,
it worked  :)
Omer Atay - 2017-01-21
Dan: You need to also set $OutLine.sizeSetByUser = true for the width to stick. Otherwise OneNote will revert the width to a size that it calculates.
Dan - 2017-01-21
Hi Omer,

I am trying to Set the Outline width of the containers on all pages in a  section to 800.

I can only do the first page.


<?xml version="1.0" encoding="utf-16"?>
<Macro name="Outlines" category="TEST"  version="15">
  <Comment text="For each Page in CurrentSection" />
  <ForEach var="Page">
    <Array>QueryObjects("Page", GetCurrentSection())</Array>
    <ForEach var="OutLine">
      <Array>QueryObjects("Outline", $Page)</Array>
      <Expression>$OutLine.selection = "all"</Expression>
      <Expression>$OutLine.width = 800</Expression>
    </ForEach>
  </ForEach>
</Macro>



I have tried everything  :(

How can I set the width of the outlines on all pages - my code only works for 1 page

Thank you