+ Reply to Thread
Results 1 to 6 of 6

Developer? - Drop down selection that inserts paragraph

  1. #1
    Registered User
    Join Date
    03-06-2017
    Location
    Aus
    MS-Off Ver
    2010
    Posts
    4

    Question Developer? - Drop down selection that inserts paragraph

    Hi all

    In a nutshell, I have a document template that is locked down to "filling out forms" only which assists with end users not deleting applicable clauses.

    There are various points throughout the document where the applicable paragraph needs to be selected, my thought process is to use a drop down item where you select the applicable paragraph, however, word does not like paragraphs being used with the "Drop-down box content control". So I'm hoping an alternative can be suggested? Noting that I am not very experienced with VBA, but willing to give it a shot.

    e.g.

    Clause x.x

    Not applicable
    OR
    Principal will supply ....etc
    OR
    Contractor to supply .... etc



    If the above is possible, is it also possible for an option to be selected that contains a content control field?

    Thanks in advance

    ----

    I am using an inefficient workaround at the moment, being, the spots where an option needs to be selected is contained within its own section that is unlocked. A user simply goes in an deletes the two paragraphs that don't apply.

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Developer? - Drop down selection that inserts paragraph

    You could use a dropdown content control to output multiple paragraphs using code like:
    Please Login or Register  to view this content.
    Where the Value for a given entry contains one or more paragraphs whose content is separated by '|' rather than paragraph breaks.

    For an implementation using line breaks instead of paragraph breaks, see: http://www.msofficeforums.com/word-v...html#post46903
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    03-06-2017
    Location
    Aus
    MS-Off Ver
    2010
    Posts
    4

    Re: Developer? - Drop down selection that inserts paragraph

    Absolutely fantastic, this is a potential solution to my problem.

    Is it possible to have the display name/drop down box of the content control a keyword i.e. Principal to Supply or Consultant to Supply followed by the value being pasted and the original keyword not being visible?

    For instance; Drop down list selection is Principal to Supply and value equals:

    For the following the Principal will supply etc etc.

    Currently it will equal:
    Principal to Supply For the following the Principal will supply etc etc.

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Developer? - Drop down selection that inserts paragraph

    Quote Originally Posted by SQUiDx View Post
    Is it possible to have the display name/drop down box of the content control a keyword i.e. Principal to Supply or Consultant to Supply followed by the value being pasted and the original keyword not being visible?

    For instance; Drop down list selection is Principal to Supply and value equals:

    For the following the Principal will supply etc etc.
    Not without some fairly complex code, since dropdowns don't support changing the displayed text to something other that what appears in the selections. Even so, as soon as one makes a selection and exits the control, the 'value' content will be output. If the user decides that's not the one they want, they can go back and make a different selection.

  5. #5
    Registered User
    Join Date
    03-06-2017
    Location
    Aus
    MS-Off Ver
    2010
    Posts
    4

    Re: Developer? - Drop down selection that inserts paragraph

    Perhaps another way, if its possible, is to have my three options laid out as below but the text protected from accidental amendment/deletion and have three buttons, which ever button is checked deletes the remaining options.

    Does this sound like something possible?

    Just so we are on the same page this is an extract:

    C 3.5.2 Principal supply items

    Not applicable.

    OR

    Principal Supply Items (where relevant to this Contract) shall be collected during normal working hours/days from the following location(s) Click here to enter text.

    OR

    Shall be delivered to site during normal working hours/days.
    The Contractor shall notify the Principal in writing in a timely manner of when Principal Supply Items are required with regard to and as appropriate for the item(s) involved. In any case notification for collection/delivery shall be at least one calendar month prior to the required delivery date.
    The Contractor shall be responsible for handling, transport, loading, unloading and storage of the Principal Supply Items from the time/point of collection/delivery. Once collected/delivered Principal Supply Items shall become the Contractor’s responsibility and for all & any subsequent damage, theft and loss.

  6. #6
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Developer? - Drop down selection that inserts paragraph

    Well, if you have a dropdown with three selections -
    Not applicable
    Principal to supply
    Contractor to supply
    The macro can handle the output. If you put the output content control immediately after the dropdown, and have the appropriate values for each. Your output can end up as:

    Not applicable

    OR

    Principal to supply: Principal Supply Items (where relevant to this Contract) shall be collected during normal working hours/days from the following location(s).

    OR

    Contractor to supply: Principal Supply Items shall be delivered to site during normal working hours/days.
    The Contractor shall notify the Principal in writing in a timely manner of when Principal Supply Items are required with regard to and as appropriate for the item(s) involved. In any case notification for collection/delivery shall be at least one calendar month prior to the required delivery date.
    The Contractor shall be responsible for handling, transport, loading, unloading and storage of the Principal Supply Items from the time/point of collection/delivery. Once collected/delivered Principal Supply Items shall become the Contractor’s responsibility and for all & any subsequent damage, theft and loss.

    For the second selection, it would also be possible to conditionally insert a another content control for your 'Click here to enter text' requirement.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. drop down list tool is not active in developer in my excel
    By roofi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-11-2015, 04:43 PM
  2. [SOLVED] Drop down pulls string value (paragraph) and is concatenated.
    By AM949 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-06-2014, 11:02 PM
  3. Drop-down list button, that inserts new row below currently selected cell
    By hnuuma in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-04-2013, 02:46 PM
  4. [SOLVED] Selection.EntireRow.Insert Inserts too many Rows!
    By nickv02 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2012, 11:40 AM
  5. Macro: Drop Down Menu Selection Inserts Templated Rows
    By nealshah4 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-27-2011, 06:31 PM
  6. Dropdown selection inserts certain text
    By msaz87 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-21-2008, 03:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1