![]() |
|
#1
|
||||
|
||||
![]()
It is a 'feature' of Word to uncollapse the headings on open (so you don't get a surprise with content you didn't see).
To deal with that, you could have a macro which runs when you open the doc Code:
Private Sub Document_Open() Dim aCC As ContentControl For Each aCC In ActiveDocument.ContentControls If aCC.Type = wdContentControlCheckBox Then aCC.Range.Paragraphs(1).CollapsedState = aCC.Checked End If Next aCC End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
![]() |
Tags |
collapse, expand |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA Assign Checkbox Content Control Symbols | warbird | Word VBA | 3 | 01-16-2018 12:26 PM |
![]() |
DEsh | Word VBA | 2 | 10-06-2017 08:23 PM |
![]() |
allikat305 | Word Tables | 5 | 11-22-2016 11:20 PM |
![]() |
derajlance | Word VBA | 1 | 05-13-2016 01:55 PM |
![]() |
DougsGraphics | Word VBA | 2 | 06-24-2015 07:31 AM |