View Single Post
 
Old 04-01-2022, 06:21 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 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

Graham gave you the solution already.

Note that there is a gotcha with the .ShowHiddenText - if the user has ShowAll then it doesn't matter about the showhiddentext. To deal with that and make the code a bit shorter...
Code:
Private Sub CheckBox1_Click()
  ActiveWindow.View.ShowHiddenText = False
  ActiveWindow.View.ShowAll = False
  ActiveDocument.Bookmarks("BMName").Range.Font.Hidden = CheckBox1.Value And CheckBox2.Value
End Sub

Private Sub CheckBox2_Click()
  CheckBox1_Click
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote