View Single Post
 
Old 11-21-2014, 02:07 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

As coded, the macro assumes you want to update the first content control in the document having the title 'ID'. Evidently the one you want to update either lacks the title or isn't the first with that title. An alternative approach is to refer to the content control by its relative position in the document, using code like:
ActiveDocument.ContentControls(1)
replacing the '1' with whatever number corresponds with your dropdown content control. Selecting the content control makes no difference.

If you want to populate another content control with data based on your selection from the dropdown, you could adapt the macro in the attachment to post: https://www.msofficeforums.com/word-vba/16498-multiple-entries-dropdown-lists.html. With a little work, that code could even be modified to output different data to each of a plethora of other content controls.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote