title: VBA in Word: If then to toggle bookmarks hidden/unhidden
body: <p>This VBA code seems like it should work to toggle hidden = True/ False on bookmarks in Word, but it doesn't.     </p>
  
  <pre><code>Private Sub Instructions_Click()
  
  If ActiveDocument.Bookmarks("InstText").Range.Font.Hidden = True Then
  
  Bookmarks("InstText").Range.Font.Hidden = False
  
  Else
  
  Bookmarks("InstText").Range.Font.Hidden = True
  
  End If
  
  End Sub
  </code></pre>
  
  <p>This next one works (if you click the <code>Instructions</code> button, the appropriate bookmarked text is unhidden)</p>
  
  <pre><code>Private Sub Instructions_Click()
  
  ActiveDocument.Bookmarks("InstText").Range.Font.Hidden = False
  
  End Sub
  </code></pre>
  
  <p>Another idea I saw is this one:</p>
  
  <pre><code>Private Sub Instructions_Click()
  
  ActiveDocument.Bookmarks("InstText").Range.Font.Hidden = Not  ActiveDocument.Bookmarks("InstText").Range.Font.Hidden
  </code></pre>
  
  <p>Which is supposed to flip it to whatever it's not, basically. But that doesn't work for me. </p>
  
  <p>Can anyone tell me what's wrong with the first one? I'm guessing that the hidden property can't be used as a condition for some reason, but -- why not? Or is it something else? What's the best way to do this?</p>