Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-24-2014, 06:38 AM
wrighty632 wrighty632 is offline Hide Text of Same Indent Windows 7 64bit Hide Text of Same Indent Office 2007
Novice
Hide Text of Same Indent
 
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
  #2  
Old 06-24-2014, 08:33 AM
jpb103's Avatar
jpb103 jpb103 is offline Hide Text of Same Indent Windows 7 64bit Hide Text of Same Indent Office 2007
Advanced Beginner
 
Join Date: May 2014
Location: Thunder Bay, Ontario
Posts: 58
jpb103 is on a distinguished road
Default

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.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Text of Same Indent 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
Hide Text of Same Indent Disappearing left-indent with invisible text smodtactical Word 2 11-12-2009 10:37 AM

Other Forums: Access Forums

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