View Single Post
 
Old 01-03-2024, 03:03 AM
Italophile Italophile is offline Windows 11 Office 2021
Expert
 
Join Date: Mar 2022
Posts: 538
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Your code is failing because the bookmark doesn't enclose the entire row, though you don't need the bookmark as you can access the row directly through the content controls range.

Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
    With ContentControl
        If .Range.Information(wdWithInTable) Then
            .Range.Rows(1).Range.Font.Hidden = Not .Checked
        End If
    End With
End Sub
Reply With Quote