We help IT Professionals succeed at work.

checkbox to hide entire section

599 Views
Last Modified: 2017-03-13
Hi guys,
I would need your help. I have a document with several sections (i.e. Services), and the idea is to create checkboxes on start. If we select one service, the section regarding it is shown, if we don't select it, it remains hidden.
Example
Service 1
Service 2
Service 3

Section Service 1 (with content bellow)
Section Service 2 (with content bellow)
etc.

So services that i select with checkbox are visible and the ones that are not, remain hidden. (also it would be good if there is a possibility to keep the sorting, that if I select first Service 2, then Service 1, to still be in the document in line).

I'm quite new in this and I would really appreciate all the help I could get.
Comment
Watch Question

RaminTechnical Advisor
CERTIFIED EXPERT

Commented:
Try the attached file, with clicking on the triangle you can also hide everything except the header.
ZZZZ.docx

Author

Commented:
Hi Ramin,
thank you for your reply, but what I was going for is something else.

I've attached a quick example with 2 checkboxes, now, what I need is to "unhide" the service that is been selected, or keep it "hidden" if it's not selected.

Could you please provide me with any possible solution for that?

Kind regards,

Nenad
Paul SauvéRetired
CERTIFIED EXPERT

Commented:
@Nenad
I've attached a quick example with 2 checkboxes, now, what I need is to "unhide" the service that is been selected, or keep it "hidden" if it's not selected.
No attached file ;-)

Author

Commented:
My bad, forgot to press "upload file" button :)
example.docx
Ark
CERTIFIED EXPERT

Commented:

Author

Commented:
Ark, I've looked into that one before, and at the end someone asked the similar question as mine (How would you apply this to multiple sections as well), and it was advised to ask a separate question.
Which led me to a thought that the solution might be bit different.

On the solution https://www.experts-exchange.com/questions/22703028/Macro-to-Display-Hide-Section-of-a-Word-Document.html
GrahamSkan gave a great idea and code, I tried to use it (using his code replacing the "Section2" with "Service1" - from my example) but I did not get it running.
And I've selected entire section as autotext, and followed all the guidelines.

Author

Commented:
The solution definitely doesn't work. If anyone could provide further assistance or help, I would appreciate it
Paul SauvéRetired
CERTIFIED EXPERT

Commented:
maybe you can find something useful to adapt to your needs here:Toggle Data Display
...

Applications for this type of document might include:
  • A schedule of events with the display of event details hidden unless a user elects to see the details.
  • A procedure might have general steps with an option to display more detailed instructions.
  • Teachers might prepare a set of math problems with the option to display how the problem is worked out, or a set of question with an option to display the answers.

This Microsoft Word Help & Microsoft Word Tips page provides some methods and techniques to allow the document user to show/hide (or expand/collapse) document content.
...
http://gregmaxey.com/word_tip_pages/toggle_data_display.html
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
This did the work, thank you very much for this, I appreciate it

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.