Need to create a macro or simple program in Word 2010. Document is in chapters with heading level 1-4. Chapter 2 has section 2.1, which has sections 2.1.1 and 2.1.2, for example. At the beginning of some sections, there will be a checkbox control. If the checkbox is selected, the rest of the section is marked as Font type of hidden. The checkbox remains visible. If the checkbox is unselected, the text is marked as unhidden. The section ends at the next number, so if section 2.1 has the checkbox, section 2.2 remains visible. If section 2.1.1 has the checkbox, then section 2.1.2 remains visible. And, if section 2.1.2 has the checkbox, then section 2.2 remains visible.
Each section can have more than one paragraph, and may contain subsections, tables, or graphics. All of that must be marked as hidden, as much as possible. I will settle for text and tables only if necessary.
The code will appear many times in the document, but not every section will be collapsible.