![]() |
#4
|
||||
|
||||
![]()
Hmm, bookmarks can only exist once in a document so you can't bookmark the second region with the same bookmark name. You could append a digit to the related bookmarks and adjust the code to also look for extra digits in the bookmark name.
Alternately, you could move away from the bookmark method of tagging areas for hiding and use other content controls for this purpose. The benefit of using Content Controls for your tagging is that you can loop through CCs which share an attribute like Tag or Title. For example Code:
Dim aCC As ContentControl For Each aCC In ActiveDocument.SelectContentControlsByTag("Hi") aCC.Range.Font.Hidden = True Next aCC
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
UserForm with checkboxes that hide/show bookmarked text in document | dohertym | Word VBA | 4 | 05-16-2022 09:48 PM |
Checkbox - toggle hide/unhide other checkboxes and their texts | Basse | Word VBA | 2 | 05-11-2022 10:43 PM |
Hide one bookmark when Two checkboxes are checked | AVarg123 | Word VBA | 4 | 04-01-2022 06:21 PM |
REf Fields show Bookmark whole cell when Bookmark is created by code. | pmcpowell | Word VBA | 2 | 11-16-2019 07:05 PM |
Bookmark will not show/hide based on CC Checkbox | lord_kaiser | Word VBA | 1 | 04-17-2018 01:19 AM |