Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Bikertyke Bikertyke is offline
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey Greg Maxey is offline
external usenet poster
 
Posts: 285
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Bikertyke Bikertyke is offline
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey Greg Maxey is offline
external usenet poster
 
Posts: 285
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Bikertyke Bikertyke is offline
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Bikertyke Bikertyke is offline
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey Greg Maxey is offline
external usenet poster
 
Posts: 285
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
summing a column of values from dropdown boxes [email protected] Tables 5 October 7th 06 06:14 PM
Word 2003 and Automatic Content Population Patricia Microsoft Word Help 1 September 14th 06 05:38 PM
Automatic resizing of text boxes only works with Times New Roman BostonDocumentation Page Layout 1 April 11th 06 09:25 AM
Hyperlinks in Word Dropdown Boxes Melon Microsoft Word Help 3 October 13th 05 08:41 AM
Expanding dropdown boxes - office. Mark Harding Microsoft Word Help 1 March 25th 05 03:20 PM


All times are GMT +1. The time now is 05:52 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"