Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-12-2020, 08:16 AM
cinimodaz cinimodaz is offline Help with Drop Down Windows 10 Help with Drop Down Office 2019
Novice
Help with Drop Down
 
Join Date: Jan 2020
Posts: 3
cinimodaz is on a distinguished road
Default Help with Drop Down

So I have a drop down for Employee Name, I want it to auto fill a single spot with an employee number. Shown in yellow. If possible to have the Employee Name drop down auto fill the other Employee Name box that is further down the document. But that is not required. I just want the Employee name to fill in the Employee ID box with that employees #.



Reply With Quote
  #2  
Old 01-12-2020, 05:02 PM
macropod's Avatar
macropod macropod is offline Help with Drop Down Windows 7 64bit Help with Drop Down Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

See:
Multiple entries in dropdown lists
and, for different elements from a selected item to be output to different content controls, see:
Multiple entries in dropdown lists - Page 5
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 01-12-2020, 05:50 PM
gmaxey gmaxey is offline Help with Drop Down Windows 10 Help with Drop Down Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

You can add the dropdown e.g., EName. Put the names in the Display Name field and the numbers in Value field.


Map the content control to a customXMLPart.


Add a ENum plaintext CC and map in to the same node.


Copy and paste the EName to the second location.


See attached file.



You can do all of this using my CC Tools AddIn.
Content Control Tools
Attached Files
File Type: docm joe.docm (33.6 KB, 16 views)
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #4  
Old 01-12-2020, 05:51 PM
Guessed's Avatar
Guessed Guessed is offline Help with Drop Down Windows 10 Help with Drop Down Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

There is a non-macro way of doing this by using linked Content Controls. For the simplest example of this, I will choose to link to a built-in xml property.

First go to the Developer Tab and click on the XML Mapping Pane
Put your cursor where the dropdown list needs to appear. In the XML Mapping Pane, right click on one of the xml fields (I chose Category) and choose Insert Content Control > Dropdown List
Now move your cursor to where the employee number should appear. In the XML Mapping Pane, right click on the same xml field and choose Insert Content Control > Plain Text.
Now select the Dropdown List Content Control you added and go to Developer > Properties. Add the names and numbers by using the Add button (put employee names in the Display name field and their employee number in the Value field.

Once this is done, make a selection on the dropdown and the plain text content control will show the value.
Attached Images
File Type: png InsertLinkedCC.png (21.5 KB, 67 views)
File Type: png InsertLinkedCC_2.png (25.7 KB, 65 views)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #5  
Old 01-12-2020, 05:59 PM
gmaxey gmaxey is offline Help with Drop Down Windows 10 Help with Drop Down Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Andrew,

Yes, then if you copy and paste the first Name CC as the third CC in the secondary name location, it will show the Display Name selected in the first. However, if you subsequently add Display Name/Value pairs to the first, you will need to recopy and paste to the secondary location.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #6  
Old 01-13-2020, 06:06 AM
cinimodaz cinimodaz is offline Help with Drop Down Windows 10 Help with Drop Down Office 2019
Novice
Help with Drop Down
 
Join Date: Jan 2020
Posts: 3
cinimodaz is on a distinguished road
Thumbs up

Quote:
Originally Posted by Guessed View Post
There is a non-macro way of doing this by using linked Content Controls. For the simplest example of this, I will choose to link to a built-in xml property.

First go to the Developer Tab and click on the XML Mapping Pane
Put your cursor where the dropdown list needs to appear. In the XML Mapping Pane, right click on one of the xml fields (I chose Category) and choose Insert Content Control > Dropdown List
Now move your cursor to where the employee number should appear. In the XML Mapping Pane, right click on the same xml field and choose Insert Content Control > Plain Text.
Now select the Dropdown List Content Control you added and go to Developer > Properties. Add the names and numbers by using the Add button (put employee names in the Display name field and their employee number in the Value field.

Once this is done, make a selection on the dropdown and the plain text content control will show the value.

Amazing this is precisely what I was looking for. I just need to learn now how to use already generated excel lists to auto populate word instead of me manually entering the names but this will do for now and was AMAZING thank you!
Reply With Quote
  #7  
Old 01-13-2020, 07:01 AM
gmaxey gmaxey is offline Help with Drop Down Windows 10 Help with Drop Down Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Like I said, you can do all of that with my CC Tools Add-in including populating your list from Excel.

__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #8  
Old 01-13-2020, 11:12 AM
cinimodaz cinimodaz is offline Help with Drop Down Windows 10 Help with Drop Down Office 2019
Novice
Help with Drop Down
 
Join Date: Jan 2020
Posts: 3
cinimodaz is on a distinguished road
Default

Quote:
Originally Posted by gmaxey View Post
Like I said, you can do all of that with my CC Tools Add-in including populating your list from Excel.
I looked at the tool I will download and give it a try. I have heard you mentioned on Youtube. You should really get a channel going if you dont already have one and do some tutorials on it.
Reply With Quote
  #9  
Old 01-14-2020, 09:26 AM
gmaxey gmaxey is offline Help with Drop Down Windows 10 Help with Drop Down Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

I have no idea how to do a YouTube channel
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply

Tags
design, drop down, drop down list

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activate (show) a Drop-down form field when another drop-down form field is selected from Jentis Word VBA 1 04-19-2018 09:42 PM
Drop down box list based on response to another drop down box Phideaux Excel 16 04-13-2018 03:07 AM
Help with Drop Down Drop down lists and pulling data from worksheet based on drop down selection cjoyce73 Excel 5 07-17-2017 07:40 AM
Help, auto select drop down by another drop down value? skrallemand Word VBA 3 09-11-2013 11:55 AM
drop down box dockta Word 1 03-25-2013 10:12 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft