Thread: [Solved] Hide Text of Same Indent
View Single Post
 
Old 06-24-2014, 06:38 AM
wrighty632 wrighty632 is offline Windows 7 64bit Office 2007
Novice
 
Join Date: Jun 2014
Posts: 1
wrighty632 is on a distinguished road
Default 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
Reply With Quote