Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
auto-fill the next 3 fields when selecting text from a dropdown
I currently have 4 dropdown fields on a form: Name - Position - Ext. Email.
I want the Position - Ext. & Email fields to auto-fill with the correct info, when a name is selected. Note: Each name has unique data for each field. I am ignorant when it comes to macros, so I need to have my hand held through this one. Thanks. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
auto-fill the next 3 fields when selecting text from a dropdown
You may not need a macro; this can be done with IF fields, though it can get
pretty messy if there are a lot of names. How many names are there? Provide some sample names and positions, and I'll provide some sample IF fields. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Freddie Fredricks" Freddie wrote in message ... I currently have 4 dropdown fields on a form: Name - Position - Ext. Email. I want the Position - Ext. & Email fields to auto-fill with the correct info, when a name is selected. Note: Each name has unique data for each field. I am ignorant when it comes to macros, so I need to have my hand held through this one. Thanks. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
auto-fill the next 3 fields when selecting text from a dropdown
Essentially you would run a macro on exit from the dropdown field which
would populate the other fields eg Sub OnExitDD1() 'fills text field based on content of _ dropdown field Dim oFld As FormFields Set oFld = ActiveDocument.FormFields Select Case oFld("Dropdown1").Result Case Is = "Bob" oFld("Text1").Result = "867-5309" oFld("Text2").Result= Case Is = "Joe" oFld("Text1").Result = "911-1111" oFld("Text2").Result = Case Else 'Do nothing End Select End Sub You need a case statement and a set of results for each entry in the dropdown (which here is bookmarked dropdown1 and fills fields text1 and text2) http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Freddie Fredricks wrote: I currently have 4 dropdown fields on a form: Name - Position - Ext. Email. I want the Position - Ext. & Email fields to auto-fill with the correct info, when a name is selected. Note: Each name has unique data for each field. I am ignorant when it comes to macros, so I need to have my hand held through this one. Thanks. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
auto-fill the next 3 fields when selecting text from a dropdow
I currently have 3 names - 3 postions - 3 Exts & 3 emails (each email is
identical after @...... sample: [NAME] [POSITION] [EXT] [email] @abc.com Willie Smith DIR 111 wsmith John Jones AD Ops 112 jjones Gail Storms AD Sales 120 gstorms Appreciate any help "Suzanne S. Barnhill" wrote: You may not need a macro; this can be done with IF fields, though it can get pretty messy if there are a lot of names. How many names are there? Provide some sample names and positions, and I'll provide some sample IF fields. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Freddie Fredricks" Freddie wrote in message ... I currently have 4 dropdown fields on a form: Name - Position - Ext. Email. I want the Position - Ext. & Email fields to auto-fill with the correct info, when a name is selected. Note: Each name has unique data for each field. I am ignorant when it comes to macros, so I need to have my hand held through this one. Thanks. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
auto-fill the next 3 fields when selecting text from a dropdow
Use a dropdown form field for the name, and make sure that the bookmark of
this field (in the Form Field Options) is Name. Then, instead of inserting a form field for Position, Ext, or Email, use fields such as the following: For Position: { IF { REF Name } = "Willie Smith" "DIR" }{ IF { REF Name} = "John Jones" "AD Ops" }{ IF { REF Name } = "Gail Storms" "AD Sales" } For Ext: { IF { REF Name } = "Willie Smith" "111" }{ IF { REF Name} = "John Jones" "112" }{ IF { REF Name } = "Gail Storms" "120" } For Email: { IF { REF Name } = "Willie Smith" "wsmith" }{ IF { REF Name} = "John Jones" "jjones" }{ IF { REF Name } = "Gail Storms" "gstorms" Each pair of field delimiters (the things that look like braces but can't be entered from the keyboard) must be inserted using Ctrl+F9. Note that "Calculate on exit" must be checked in the Form Field Options for your Name field, and that users must Tab out of the field (not just click the mouse elsewhere) for the IF fields to be updated. In this situation, you may find Graham's macro more practical. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Freddie Fredricks" wrote in message ... I currently have 3 names - 3 postions - 3 Exts & 3 emails (each email is identical after @...... sample: [NAME] [POSITION] [EXT] [email] @abc.com Willie Smith DIR 111 wsmith John Jones AD Ops 112 jjones Gail Storms AD Sales 120 gstorms Appreciate any help "Suzanne S. Barnhill" wrote: You may not need a macro; this can be done with IF fields, though it can get pretty messy if there are a lot of names. How many names are there? Provide some sample names and positions, and I'll provide some sample IF fields. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Freddie Fredricks" Freddie wrote in message ... I currently have 4 dropdown fields on a form: Name - Position - Ext. Email. I want the Position - Ext. & Email fields to auto-fill with the correct info, when a name is selected. Note: Each name has unique data for each field. I am ignorant when it comes to macros, so I need to have my hand held through this one. Thanks. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
auto-fill the next 3 fields when selecting text from a dropdow
If you prefer the macro solution, then the macro I posted earlier using your
further information would be Sub OnExitDD1() 'fills text field based on content of _ dropdown field Dim oFld As FormFields Set oFld = ActiveDocument.FormFields Select Case oFld("NAME").Result Case Is = "Willie Smith" oFld("POSITION").Result = "DIR" oFld("EXT").Result = "111" oFld("EMAIL").Result = "wsmith" Case Is = "John Jones" oFld("POSITION").Result = "Ad Ops" oFld("EXT").Result = "112" oFld("EMAIL").Result = "jjones" Case Is = "Gail Storms" oFld("POSITION").Result = "AdSales" oFld("EXT").Result = "120" oFld("EMAIL").Result = "gstorms" Case Else 'Do nothing End Select End Sub Set the bookmark name of the dropdown field to NAME the bookmark name of the position field to POSITION the bookmark name of the extension field to EXT and the bookmark name of the email field to EMAIL (right click the fields properties) See http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Freddie Fredricks wrote: I currently have 3 names - 3 postions - 3 Exts & 3 emails (each email is identical after @...... sample: [NAME] [POSITION] [EXT] [email] @abc.com Willie Smith DIR 111 wsmith John Jones AD Ops 112 jjones Gail Storms AD Sales 120 gstorms Appreciate any help "Suzanne S. Barnhill" wrote: You may not need a macro; this can be done with IF fields, though it can get pretty messy if there are a lot of names. How many names are there? Provide some sample names and positions, and I'll provide some sample IF fields. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Freddie Fredricks" Freddie wrote in message ... I currently have 4 dropdown fields on a form: Name - Position - Ext. Email. I want the Position - Ext. & Email fields to auto-fill with the correct info, when a name is selected. Note: Each name has unique data for each field. I am ignorant when it comes to macros, so I need to have my hand held through this one. Thanks. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fill-ins with Dropdown lists? | Mailmerge | |||
Auto fill Form Fields from previous Variable fields? | Microsoft Word Help | |||
WORD: Dropdown auto link and input into fields | Microsoft Word Help | |||
In a form, add "Additional" yes/no box if yes, dropdown & fill-in | Microsoft Word Help | |||
How do I auto fill a text field? | Microsoft Word Help |