![]() |
#1
|
|||
|
|||
![]()
I have a word document and I am required to show different text based on what the value of the dropdown is.
I've created a dropdown, Dropdown1, which has three options: "FIRST" "SECOND" "THIRD". All three options will display different text. I read here: "https://answers.microsoft.com/en-us/msoffice/forum/all/word-2003-using-a-dropdown-to-show-hide-a-table/71da1c6e-09a5-43d8-adf9-c688956c8abe?page=1" that all I need to include is this: {If {Dropdown} = "FIRST" "TEXT TO SHOW HERE"} This does nothing at all. I am using the brackets generated by Ctrl + F9. Am I putting this code in the wrong place? where is the right place? Any help appreciated. Thanks Adam |
#2
|
||||
|
||||
![]()
See, for example: Form auto fill based on a different field value.
Your: {If {Dropdown} = "FIRST" "TEXT TO SHOW HERE"} needs to be: {If {REF Dropdown} = "FIRST" "TEXT TO SHOW HERE"}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
||||
|
||||
![]()
Fields are how you could do this with older doc files. If you are using docx files content controls are a better solution because the result is updated instantly (don't need fields to update to see the result). You also don't need to add multiple or nested fields to cater for each possible choice.
An example with linked content controls is demonstrated in https://www.msofficeforums.com/130893-post3.html
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#4
|
||||
|
||||
![]() Quote:
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
||||
|
||||
![]()
I didn't know that the fields updated on exiting a dropdown formfield. That is handy. The other issue of the multiple (or nested) If fields is kind of significant as well.
Although I don't have the older version of Word to test on, the feature that required Word 2013 was the repeating CC. The OP in this thread is not looking for that so I expect the dropdown functionality demonstrated there should work in Word 2007 and later.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#6
|
||||
|
||||
![]()
With a dropdown formfield, you'd be matching exact values, so no nesting should be necessary unless you're doing something that combines its results with that of another formfield. For example:
{IF{REF Dropdown1}= "One" "One text"}{IF{REF Dropdown1}= "Two" "Two text"}{IF{REF Dropdown1}= "Three" "Three text"}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
drop down list, if statement, showing massage |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bookmark will not show/hide based on CC Checkbox | lord_kaiser | Word VBA | 1 | 04-17-2018 01:19 AM |
![]() |
nathan.gray@emerson.com | Word VBA | 5 | 12-08-2017 01:08 PM |
Help with show/hide content control | acontreras | Word VBA | 0 | 10-21-2014 07:28 PM |
![]() |
tammytran105 | Word VBA | 7 | 10-02-2014 04:30 PM |
![]() |
miscia76 | Word | 1 | 11-13-2013 04:29 PM |