none
Conditional Show/Hide of a section in MS Word Document based on selection RRS feed

  • Question

  • We are considering building a legal agreement template in WORD. There are three main elements:

    1. main terms and conditions - always there

    2. equipment list - always there

    3. extra license - optional

    Let's assume that each element has its own document section.

    If we build the form using Content Controls, can we add a checkbox or pull-down that asks whether to include the extra license (#3), and if the user chooses YES, then section #3 would be made visible; if they choose NO, then section 3 would be set to hidden ? (NOTE: we are not programmers)

    Thanks in advance!

    We had also considered making this document using Adobe LiveCycle. You can see that dialog at forums dot adobe dot com slash thread slash 1232845 - "Is LiveCycle the right tool for making a template-based Contract?"

    Tuesday, July 23, 2013 8:36 PM

Answers

  • You don't need programming to do that and in fact you don't need a content control. In the future you should post on the community forums because this is a programmer forum and again... you don't need programming. The Word community forum is: http://answers.microsoft.com/en-us/office/forum/word

    However to answer your question...

    Build the agreement as you want it with all three sections. When you are ready save it as a template. (e.g., Legal One.dotx)

    Next select all of Section 3 and go to Quick Parts on your Insert tab and save this section of as AutoText, giving it a unique name and make sure you mark to save it into your Legal One.dotx template.

    Next, go to Word > Options > Customize and select the keyboard shortcuts function. Locate AutoText from the categories, make sure you have it set to save into Legal One.dotx, find the Section 3 autotext in the list of autotext items and give it a unique keystroke sequence. (e.g., Alt+3).

    Finally, remove the Section 3 text from your Legal One.dotx template file and click save. Distribute the Legal One.dotx template to those who need it in the office.


    Kind Regards, Rich ... http://greatcirclelearning.com

    Tuesday, July 23, 2013 9:46 PM
  • <<As for the hidden text being made visible, would Editing Restrictions and Formatting Restrictions help prevent that (with a strong password), or would we still run the risk if we (1) used WORD to build/assemble the document, and then (2) distribute for review and execution via PDF?>>

    If you won't be sending out the Word document, but generating a PDF, you should first test thoroughly what happens with hidden content when you create PDF files from a document. It will depend on how the tool that generates PDF works with the document content. I don't think there's any way hidden content could be made visible once the PDF file exists, but you have to be sure the tool generating the PDF ignores hidden content.

    I understand why you'd use Content Controls. A content control should reflect the style applied to it, there wouldn't be any communication between content controls sharing the same content as far as formatting goes. Once something is inserted the user can certainly copy/paste into it.


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, August 1, 2013 4:35 PM
    Moderator

All replies

  • You don't need programming to do that and in fact you don't need a content control. In the future you should post on the community forums because this is a programmer forum and again... you don't need programming. The Word community forum is: http://answers.microsoft.com/en-us/office/forum/word

    However to answer your question...

    Build the agreement as you want it with all three sections. When you are ready save it as a template. (e.g., Legal One.dotx)

    Next select all of Section 3 and go to Quick Parts on your Insert tab and save this section of as AutoText, giving it a unique name and make sure you mark to save it into your Legal One.dotx template.

    Next, go to Word > Options > Customize and select the keyboard shortcuts function. Locate AutoText from the categories, make sure you have it set to save into Legal One.dotx, find the Section 3 autotext in the list of autotext items and give it a unique keystroke sequence. (e.g., Alt+3).

    Finally, remove the Section 3 text from your Legal One.dotx template file and click save. Distribute the Legal One.dotx template to those who need it in the office.


    Kind Regards, Rich ... http://greatcirclelearning.com

    Tuesday, July 23, 2013 9:46 PM
  • Which version of Office are you using? Word 2013 offers support for hiding/showing sections of text. But the problem with that approach, or the one you propose, is that the text will still be in the document and can be made visible again fairly easily. So Rich's suggestion of importing the required text for a specific contract is certainly the better approach for a legal document...?


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, July 24, 2013 1:01 PM
    Moderator
  • Which version of Office are you using? Word 2013 offers support for hiding/showing sections of text. But the problem with that approach, or the one you propose, is that the text will still be in the document and can be made visible again fairly easily. So Rich's suggestion of importing the required text for a specific contract is certainly the better approach for a legal document...?

    Thank you for the replies. I apologize if this is the incorrect forum. Can a moderator move this posting or shall I recreate it in another place?

    We are using MS Office Professional Plus 2010, and the WORD version appears to be 14.0.x

    One reason for intending to use Content Controls is so that the repeating contract information, such as legal name, address, effective date, signatory name, signatory title, could all be inserted into the necessary places (at least two) in the document without repeating the data entry. I found the "Word 2007 Content Control Toolkit" which makes it easy to link repeating fields together so that one data entry fills the same info in multiple places. I was also hoping that content controls could allow us to tell a style to behave differently, such as to tell section 3 text - with its own defined styles - to be hidden (or not).

    With the Quick Parts approach, it seems that even though the bulk of the optional text could be loaded, the customized portions of the optional license would still require manual copy/paste. 

    As for the hidden text being made visible, would Editing Restrictions and Formatting Restrictions help prevent that (with a strong password), or would we still run the risk if we (1) used WORD to build/assemble the document, and then (2) distribute for review and execution via PDF?

    Wednesday, July 24, 2013 5:41 PM
  • <<As for the hidden text being made visible, would Editing Restrictions and Formatting Restrictions help prevent that (with a strong password), or would we still run the risk if we (1) used WORD to build/assemble the document, and then (2) distribute for review and execution via PDF?>>

    If you won't be sending out the Word document, but generating a PDF, you should first test thoroughly what happens with hidden content when you create PDF files from a document. It will depend on how the tool that generates PDF works with the document content. I don't think there's any way hidden content could be made visible once the PDF file exists, but you have to be sure the tool generating the PDF ignores hidden content.

    I understand why you'd use Content Controls. A content control should reflect the style applied to it, there wouldn't be any communication between content controls sharing the same content as far as formatting goes. Once something is inserted the user can certainly copy/paste into it.


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, August 1, 2013 4:35 PM
    Moderator
  • I can't see an answer in this response at all. Do developers not read questions before they answer them?

    The question is, can you use a yes/no response to trigger a section to appear.

    I also don't understand why Jeffrey Chen moderated this as answered when it wasn't. Guys??? 

    Friday, February 8, 2019 9:11 PM
  • Maybe you should read Rich's reply more closely. It explains how to achieve the same end without the need for "a yes/no response to trigger a section to appear". To be sure, that could be added, but that would merely add a quite unnecessary layer of complication to the process.

    You should also consider the OP's "NOTE: we are not programmers" disclosure. Employing a content control yes/no selection for the trigger as envisaged would necessitate programming.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Saturday, February 9, 2019 2:43 AM
  • I agree with you as I am looking for the solution to the initial question and not an alternate question.  Any guidance to the original question is appreciated.
    • Edited by motled Thursday, October 24, 2019 11:32 PM
    Thursday, October 24, 2019 11:32 PM