Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-17-2018, 01:19 AM
gmayor's Avatar
gmayor gmayor is offline Bookmark will not show/hide based on CC Checkbox Windows 10 Bookmark will not show/hide based on CC Checkbox Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Without any indication of what code you are using to hide the bookmarked text, it is impossible to say, though probably it relates to the titles/tags of the check box controls. The following code will hide the bookmarked text in the bookmark 'bmName' when the check box tagged 'TagName' is checked - even if the bookmarked area contains check box content controls.

You may find https://www.gmayor.com/insert_content_control_addin.htm useful.

Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim oRng As Range
    Set oRng = ActiveDocument.Bookmarks("bmName").Range
    If ContentControl.Tag = "TagName" Then
        If ContentControl.Checked = True Then
            oRng.Font.Hidden = True
        Else
            oRng.Font.Hidden = False
        End If
    End If
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bookmark will not show/hide based on CC Checkbox How to use checkbox to show/hide bookmarked text? namrehx Word VBA 16 12-14-2017 01:45 PM
How to use checkbox to show and hide bookmarked text? namrehx Word VBA 1 12-12-2017 02:17 PM
Bookmark will not show/hide based on CC Checkbox Hide/Show text based upon check box status nathan.gray@emerson.com Word VBA 5 12-08-2017 01:08 PM
Bookmark will not show/hide based on CC Checkbox Show/Hide Text based on Checkbox Selection tammytran105 Word VBA 7 10-02-2014 04:30 PM
Bookmark will not show/hide based on CC Checkbox Show/hide paragraphs based on upfront decisions miscia76 Word 1 11-13-2013 04:29 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:24 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft