![]() |
|
#1
|
|||
|
|||
![]()
Hi all,
Couple of questions. Firstly I want to hide and show specific sections of text in a word document so followed the steps in the guide below. http://m.wikihow.com/Expand-and-Coll...Microsoft-Word Works fine but seems inefficient as I'll need a separate macro and code block for each section of text I want to hide/show. I've used a + sign to double click on to show/hide text. Is there anyway to get this to change to a - when the text is expanded? Secondly what are your thoughts on macro enabled documents from a security perspective? Initially this document will remain on the local LAN at work with the possibility of it needing to be emailed to a third party. In the word settings at work in the trust centre it has disable all but with notification. I'm guessing all macros will be disabled unless you select enable when opening up a document. Does this mean it's on a per document per computer basis? So this will be the only macro enabled document for the department? I guess what I'm wanting to know is if this is secure enough? Or will some form of digital signing/certificate make it more secure? ( sorry don't know much about this) Thanks for any help |
#2
|
||||
|
||||
![]()
That approach is a quite unreliable way of hiding content in a document. It does not, in fact expand/collapse anything. All it does is to toggle the font's hidden state for the bookmarked range. Whether it actually works depends on how the user has Word configured. If the user has Word configured to show hidden text (which is what most users who can see Word's formatting marks would have) or, even if the text does hide, whether that text gets printed, is entirely beyond the macro's control - it all depends on Word's configuration.
In answer to your question, though, yes, you'd need a separate macro for each MACROBUTTON field. A single macro could handle multiple bookmarked ranges, though. To conditionally expand/collapse a document, you really need to control what is in it, not the font properties. See, for example: https://www.msofficeforums.com/word-...html#post60848 https://www.msofficeforums.com/word-...own-lists.html https://www.msofficeforums.com/word-...own-field.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Hi thanks for the reply. Well throughout my department it works fine. Basically the text for each section, 1,2,3,4 ect is helper text to give an example of what to write in those sections. Hiding it to write your text and showing it to get any help for that specific section.
For my needs it's good enough but would of liked the macro but to change dynamically but it's not a deal breaker so I'll keep it for now. Any thoughts on security with macro enabled documents? |
#4
|
|||
|
|||
![]()
*macro button
|
#5
|
||||
|
||||
![]()
If all you need is 'helper' text that gets hidden when the document is printed, see 'Use a date test to provide pre-printing instructions' and 'Show or hide instructions & graphics at print time' in my Microsoft Word Date Calculation Tutorial, in the 'Sticky' thread at the top of the Word Forum:
https://www.msofficeforums.com/word/...-tutorial.html No macros required. Do read the document's introductory material.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
iiiiifffff | Word VBA | 16 | 06-04-2016 01:47 AM |
![]() |
Treespicer | Word VBA | 3 | 04-30-2014 06:56 AM |
Word Macro for hiding text | Phil Pense | Word | 1 | 07-23-2012 08:17 PM |
![]() |
simpleonline1234 | Word VBA | 1 | 02-25-2011 02:28 AM |
Hiding text | Reg06 | Visio | 0 | 01-15-2011 08:04 AM |