Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2020, 12:17 AM
Guessed's Avatar
Guessed Guessed is offline Toggle Collapse/Expand via Content Control Checkbox Windows 10 Toggle Collapse/Expand via Content Control Checkbox Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
Reply

Tags
collapse, expand



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Assign Checkbox Content Control Symbols warbird Word VBA 3 01-16-2018 12:26 PM
Toggle Collapse/Expand via Content Control Checkbox One Content Control Checkbox checks another Content Control Checkbox DEsh Word VBA 2 10-06-2017 08:23 PM
Toggle Collapse/Expand via Content Control Checkbox Content control checkbox calculations allikat305 Word Tables 5 11-22-2016 11:20 PM
Toggle Collapse/Expand via Content Control Checkbox Show Userform when Content Control CheckBox ticked derajlance Word VBA 1 05-13-2016 01:55 PM
Toggle Collapse/Expand via Content Control Checkbox Clicking the selected Content Control checkbox returns wrong control in vba event DougsGraphics Word VBA 2 06-24-2015 07:31 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft