View Single Post
 
Old 11-24-2022, 03:24 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

There is no code in your attachment. From your description you should have:
Code:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
With CCtrl
  Select Case .Title
    Case "Checkbox1"
      ActiveDocument.SelectContentControlsByTitle("ConditionalText1")(1).Range.Font.Hidden = Not .Checked
    Case "Checkbox2"
      ActiveDocument.SelectContentControlsByTitle("ConditionalText2")(1).Range.Font.Hidden = Not .Checked
  End Select
End With
End Sub
Additionally, I can find no checkbox titled 'Checkbox2'.

Furthermore, I note your conditional texts include tables. Hiding the text in those content controls cannot hide the tables. Accordingly, you need a different approach - one that uses field coding to conditionally display the content or that conditionally inserts Custom Quick Parts into the document from its template.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote