Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic population of text boxes from dropdown selections
I'm trying to produce a document in WORD 03 that will allow a user to select
items from dropdowns in a list of contents that will then populate text boxes in other areas of the document with information relevant to the selection made in the dropdown e.g. if the user selects apples from the drop down the description will automatically be populated with, say "fresh and crunchy, ideal for snacks' and the colour will populate with 'red'. If the user selects pears different descriptions and colour would be used. It would also be preferable for the dropdown and text box to be removed if no selection is made in order that no gaps are left in the body of the document. Ideas for macro's gratefully recieved as programing is not a strong point. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic population of text boxes from dropdown selections
You will need to edit this code for you specific needs (e.g., populate a
text field vice another dropdown) but it should be you started: http://gregmaxey.mvps.org/Linked_DropDown_Fields.htm -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. "Bikertyke" wrote in message ... I'm trying to produce a document in WORD 03 that will allow a user to select items from dropdowns in a list of contents that will then populate text boxes in other areas of the document with information relevant to the selection made in the dropdown e.g. if the user selects apples from the drop down the description will automatically be populated with, say "fresh and crunchy, ideal for snacks' and the colour will populate with 'red'. If the user selects pears different descriptions and colour would be used. It would also be preferable for the dropdown and text box to be removed if no selection is made in order that no gaps are left in the body of the document. Ideas for macro's gratefully recieved as programing is not a strong point. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic population of text boxes from dropdown selections
Greg
Thanks for that. I presume i'd substitute 'Dim oDD As DropDown' with 'Dim oTF As TextField' (TF) and "SecondaryDD" with "PrimaryTF" or similar. Since I do not want to ListEntries what would be the substitute for 'oDD.ListEntries' entry? Thanks again. "Greg Maxey" wrote: You will need to edit this code for you specific needs (e.g., populate a text field vice another dropdown) but it should be you started: http://gregmaxey.mvps.org/Linked_DropDown_Fields.htm -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. "Bikertyke" wrote in message ... I'm trying to produce a document in WORD 03 that will allow a user to select items from dropdowns in a list of contents that will then populate text boxes in other areas of the document with information relevant to the selection made in the dropdown e.g. if the user selects apples from the drop down the description will automatically be populated with, say "fresh and crunchy, ideal for snacks' and the colour will populate with 'red'. If the user selects pears different descriptions and colour would be used. It would also be preferable for the dropdown and text box to be removed if no selection is made in order that no gaps are left in the body of the document. Ideas for macro's gratefully recieved as programing is not a strong point. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic population of text boxes from dropdown selections
Use something like this:
Sub OnExitDDListA() Dim oFFs As FormFields Set oFFs = ActiveDocument.FormFields Select Case ActiveDocument.FormFields("DropDown1").Result Case "A" oFFs("Text1").Result = "First letter of alphabet" Case "B" Case "C" End Select End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Bikertyke wrote: Greg Thanks for that. I presume i'd substitute 'Dim oDD As DropDown' with 'Dim oTF As TextField' (TF) and "SecondaryDD" with "PrimaryTF" or similar. Since I do not want to ListEntries what would be the substitute for 'oDD.ListEntries' entry? Thanks again. "Greg Maxey" wrote: You will need to edit this code for you specific needs (e.g., populate a text field vice another dropdown) but it should be you started: http://gregmaxey.mvps.org/Linked_DropDown_Fields.htm -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. "Bikertyke" wrote in message ... I'm trying to produce a document in WORD 03 that will allow a user to select items from dropdowns in a list of contents that will then populate text boxes in other areas of the document with information relevant to the selection made in the dropdown e.g. if the user selects apples from the drop down the description will automatically be populated with, say "fresh and crunchy, ideal for snacks' and the colour will populate with 'red'. If the user selects pears different descriptions and colour would be used. It would also be preferable for the dropdown and text box to be removed if no selection is made in order that no gaps are left in the body of the document. Ideas for macro's gratefully recieved as programing is not a strong point. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic population of text boxes from dropdown selections
That works perfectly...and it's simple. Thanks very much
"Greg Maxey" wrote: Use something like this: Sub OnExitDDListA() Dim oFFs As FormFields Set oFFs = ActiveDocument.FormFields Select Case ActiveDocument.FormFields("DropDown1").Result Case "A" oFFs("Text1").Result = "First letter of alphabet" Case "B" Case "C" End Select End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Bikertyke wrote: Greg Thanks for that. I presume i'd substitute 'Dim oDD As DropDown' with 'Dim oTF As TextField' (TF) and "SecondaryDD" with "PrimaryTF" or similar. Since I do not want to ListEntries what would be the substitute for 'oDD.ListEntries' entry? Thanks again. "Greg Maxey" wrote: You will need to edit this code for you specific needs (e.g., populate a text field vice another dropdown) but it should be you started: http://gregmaxey.mvps.org/Linked_DropDown_Fields.htm -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. "Bikertyke" wrote in message ... I'm trying to produce a document in WORD 03 that will allow a user to select items from dropdowns in a list of contents that will then populate text boxes in other areas of the document with information relevant to the selection made in the dropdown e.g. if the user selects apples from the drop down the description will automatically be populated with, say "fresh and crunchy, ideal for snacks' and the colour will populate with 'red'. If the user selects pears different descriptions and colour would be used. It would also be preferable for the dropdown and text box to be removed if no selection is made in order that no gaps are left in the body of the document. Ideas for macro's gratefully recieved as programing is not a strong point. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic population of text boxes from dropdown selections
Can I add anything to auto update the text box as soon as the dropdown is
clicked. The text in the box is not updated for prints and saves without clicking outside the dropdown and this could lead to errors. Cheers "Bikertyke" wrote: That works perfectly...and it's simple. Thanks very much "Greg Maxey" wrote: Use something like this: Sub OnExitDDListA() Dim oFFs As FormFields Set oFFs = ActiveDocument.FormFields Select Case ActiveDocument.FormFields("DropDown1").Result Case "A" oFFs("Text1").Result = "First letter of alphabet" Case "B" Case "C" End Select End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Bikertyke wrote: Greg Thanks for that. I presume i'd substitute 'Dim oDD As DropDown' with 'Dim oTF As TextField' (TF) and "SecondaryDD" with "PrimaryTF" or similar. Since I do not want to ListEntries what would be the substitute for 'oDD.ListEntries' entry? Thanks again. "Greg Maxey" wrote: You will need to edit this code for you specific needs (e.g., populate a text field vice another dropdown) but it should be you started: http://gregmaxey.mvps.org/Linked_DropDown_Fields.htm -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. "Bikertyke" wrote in message ... I'm trying to produce a document in WORD 03 that will allow a user to select items from dropdowns in a list of contents that will then populate text boxes in other areas of the document with information relevant to the selection made in the dropdown e.g. if the user selects apples from the drop down the description will automatically be populated with, say "fresh and crunchy, ideal for snacks' and the colour will populate with 'red'. If the user selects pears different descriptions and colour would be used. It would also be preferable for the dropdown and text box to be removed if no selection is made in order that no gaps are left in the body of the document. Ideas for macro's gratefully recieved as programing is not a strong point. |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic population of text boxes from dropdown selections
I am not 100% sure, but I think the short answer is no. That and other
annoyances are why I usually avoid protected forms and use a UserForm instead. -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Bikertyke wrote: Can I add anything to auto update the text box as soon as the dropdown is clicked. The text in the box is not updated for prints and saves without clicking outside the dropdown and this could lead to errors. Cheers "Bikertyke" wrote: That works perfectly...and it's simple. Thanks very much "Greg Maxey" wrote: Use something like this: Sub OnExitDDListA() Dim oFFs As FormFields Set oFFs = ActiveDocument.FormFields Select Case ActiveDocument.FormFields("DropDown1").Result Case "A" oFFs("Text1").Result = "First letter of alphabet" Case "B" Case "C" End Select End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Bikertyke wrote: Greg Thanks for that. I presume i'd substitute 'Dim oDD As DropDown' with 'Dim oTF As TextField' (TF) and "SecondaryDD" with "PrimaryTF" or similar. Since I do not want to ListEntries what would be the substitute for 'oDD.ListEntries' entry? Thanks again. "Greg Maxey" wrote: You will need to edit this code for you specific needs (e.g., populate a text field vice another dropdown) but it should be you started: http://gregmaxey.mvps.org/Linked_DropDown_Fields.htm -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. "Bikertyke" wrote in message ... I'm trying to produce a document in WORD 03 that will allow a user to select items from dropdowns in a list of contents that will then populate text boxes in other areas of the document with information relevant to the selection made in the dropdown e.g. if the user selects apples from the drop down the description will automatically be populated with, say "fresh and crunchy, ideal for snacks' and the colour will populate with 'red'. If the user selects pears different descriptions and colour would be used. It would also be preferable for the dropdown and text box to be removed if no selection is made in order that no gaps are left in the body of the document. Ideas for macro's gratefully recieved as programing is not a strong point. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
summing a column of values from dropdown boxes | Tables | |||
Word 2003 and Automatic Content Population | Microsoft Word Help | |||
Automatic resizing of text boxes only works with Times New Roman | Page Layout | |||
Hyperlinks in Word Dropdown Boxes | Microsoft Word Help | |||
Expanding dropdown boxes - office. | Microsoft Word Help |