Hiding sections in Microsoft Word

Hi,

I have a checklist I am developing and certain sections are applicable in certain situations only. I would like to hide the sections not relevant based on checkbox responses made by the user so the checklist is customised to their situation. Can this be done in Word 2013? If so, please explain how.
Nyaradzo ChitsikeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

FlysterCommented:
You can use this code in each of your check-boxes:
Private Sub CheckBox1_Click()
On Error Resume Next
  If CheckBox1.Value = True Then
    ActiveDocument.Sections(2).Range.Font.Hidden = True
  Else
    ActiveDocument.Sections(2).Range.Font.Hidden = False
  End If
End Sub

Open in new window

I had to convert the attached document to Word 2003 as I was unable to upload a 2010 Macro-Enabled document. Should work for 2013 too.

Flyster
HideSections.doc

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Nyaradzo ChitsikeAuthor Commented:
Thanks, it worked!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.