Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-29-2014, 08:48 PM
macropod's Avatar
macropod macropod is offline Show/Hide Text based on Checkbox Selection Windows 7 64bit Show/Hide Text based on Checkbox Selection Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

There are numerous problems with this approach:
1. Your approach modifies Word's .ShowHiddenText property, which necessarily applies to all documents. You cannot use it to apply to just one document or even part of one document. In any event, this doesn't stop such text appearing on printouts.
2. Trying to control document content by hiding/unhiding text, which can be done for just a nominated range (e.g. a bookmarked range) is quite unreliable. That's because whether the text displays or prints (even if not displayed) are controlled by Word configuration settings that are independent of the document. You would have to manipulate those settings as well. When you do this, you need to both trap the user's original configuration and switch back to that whenever they switch to another document or close yours; otherwise, you risk compromising they way they want their systems to work.

For proper control, you need to conditionally add/delete the variable content or vary its display/non-display via field coding.

PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Show/Hide Text based on Checkbox Selection Hide/Unhide a Block of Text Based on Choice Selection inquirer Word VBA 7 09-22-2014 04:41 PM
Show/Hide Text based on Checkbox Selection Hide Checkbox When Printing vinceplunkett Word 1 12-03-2013 01:53 AM
Show/Hide Text based on Checkbox Selection Show/hide paragraphs based on upfront decisions miscia76 Word 1 11-13-2013 04:29 PM
Show/Hide Text based on Checkbox Selection VBA for CheckBox to Hide Slides mutchy25 PowerPoint 1 09-21-2012 01:40 AM
Macro to populate a text form field based on dropdown selection koloa Word 0 10-20-2011 11:52 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:34 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