Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-16-2018, 11:26 PM
lord_kaiser lord_kaiser is offline Bookmark will not show/hide based on CC Checkbox Windows 10 Bookmark will not show/hide based on CC Checkbox Office 2016
Novice
Bookmark will not show/hide based on CC Checkbox
 
Join Date: Apr 2018
Posts: 13
lord_kaiser is on a distinguished road
Default Bookmark will not show/hide based on CC Checkbox

Hi There,



I have a bookmark that shows and hide based on a CC Checkbox.

What i have observed is that for some reason it does not seem to be working if there are other CC Checkboxes located in the bookmark area?

Any idea why this is the case?

Thanks
Reply With Quote
  #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,101
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 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
Reply

Thread Tools
Display Modes


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 11:16 PM.


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