#1
|
|||
|
|||
Hide Text of Same Indent
I'm trying to write a multi-layered document so that a given step hides the relevant text.
E.g. 1.Step 1 2.Step 2 ___Step 2a ___Step 2b ______Step 2bi ___Step c 3.Step 3 So if I were to select step 2, I could hide all the sub-steps (step2a, 2b, 2bi, etc). 1.Step 1 2.Step 2 3.Step 3 I've got the following code (after recording and trying to edit the macro), but it doesn't work Selection.MoveDown Unit:=wdParagraph, Count:=1 Selection.Paragraphs(1).SelectNumber Selection.Expand wdLine With Selection.Font .Hidden = True End With I'm a word VBA n00b Thanks |
#2
|
||||
|
||||
This thread might be of interest to you: https://www.msofficeforums.com/word-...le-button.html
You could modify the toggle macro in that thread to accept a string, which would be the name of the bookmark placed on the area of the document you wish to hide/show. I'm not completely sure it will work for sub sections within sub sections but I think it's probably worth a try. |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
grayed 'choose an item' text appears in printing, how to hide? | bjsa06 | Word | 3 | 12-19-2013 12:07 AM |
How to hide text in the plus symbol "+", like in *.chm files | Alexis | Word | 4 | 06-02-2013 12:04 PM |
Bullet text indent problem | dfp1964 | PowerPoint | 0 | 12-04-2011 08:03 AM |
Why the "decrease indent" doesn't affect the selected text to move???? | Jamal NUMAN | Word | 0 | 07-12-2011 04:10 PM |
Disappearing left-indent with invisible text | smodtactical | Word | 2 | 11-12-2009 10:37 AM |