Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word

LinkBack Thread Tools Display Modes
Old 07-23-2012, 08:27 AM
Phil Pense Phil Pense is offline Windows 7 64bit Office 2007
Join Date: Jan 2012
Posts: 2
Phil Pense is on a distinguished road
Default Word Macro for hiding text

Following the guidance on a macro tutorial that would hide/show text on demand. Pasted the VBA into Word document but do not know how to proceed so that text line(s) can toggle.

Images are uploaded to a Microsoft SkyDrive folder.!1670

An excerpt of some of the tutorial is also attached as "Method 2"

Guidance sought
Attached Files
File Type: docx Private Sub ToggleButton1.docx (11.3 KB, 20 views)
File Type: docx Method 2 of Macro.docx (72.4 KB, 16 views)
Reply With Quote
Old 07-23-2012, 08:17 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 17,820
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold

You cannot reliably control the display (or printing) of text formatted as hidden. Whether such text is displayed and/or printed is entirely dependent on the user's Word setup. For example, something as simple a clicking on the symbol on the Ribbon's Home tab can override any attempt to hide the text.

The only reliable way to control the display of a given set of text is to control whether it is present in the document. This means having either a bookmarked range than you code conditionally populates/erases or a DOCPROPERTY field that references a custom document property that conditionally contains the text or conditionally references another one that does contain the text.
Paul Edstein
[MS MVP - Word]
Reply With Quote

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
hiding images in word document gib65 Word 3 08-17-2011 11:09 AM
hiding selected objects in word document gib65 Word 0 08-09-2011 12:00 PM
Need help on Macro 03- Find text - if text is blank then remove line simpleonline1234 Word VBA 1 02-25-2011 02:28 AM
Hiding text Reg06 Visio 0 01-15-2011 08:04 AM
Recomend a information hiding tool for word 2007 files AlexanderLee Word 0 01-05-2010 01:11 AM

All times are GMT -7. The time now is 06:40 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc. is not affiliated with Microsoft