Hello,
I am new to MS VBA and i have a very special Question.
I am trying to hide a bookmarked text with a ContentControlCheckBox.
I tried this code:
Code:
Private Sub Document_ContentControlBeforeContentUpdate(ByVal ContentControl As ContentControl, Content As String)
If ContentControl.Tag = "Checkbox1" Then
If Content = "true" Then ActiveDocument.Bookmarks("Test1").Range.Font.Hidden = True
If Content = "false" Then ActiveDocument.Bookmarks("Test1").Range.Font.Hidden = False
End If
End Sub
But i just get an error message: Runtime error 6197: This object model error is not available in the current event.
What am i doing wrong? Can somebody help me with this?