Retrieve a Dropdown Value in a Word VBA Macro
Question details
Retrieve the stored value associated with the selected display text in a Word dropdown content control.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- A Word VBA macro needs to add the selected dropdown entry's stored value to an email string.
- Observed behavior
- The macro retrieves the selected entry's display text, but the email needs its associated value.
In Word, enable the Developer tab if necessary and check the dropdown's Properties to confirm its entries have the intended display text and values. Give the control a unique tag and use distinct display text for each entry.
Match the selected text to a dropdown entry's value
Use the content control's DropdownListEntries collection when the macro has the selected display text but needs its stored value.
Select the dropdown in Word, open Developer > Properties, and enter a unique Tag such as EmailDropdown. Check that each entry has the desired display text and value.
Go to Developer > Visual Basic, then choose Insert > Module in the VBA editor.
Paste the following code into the module. It finds the tagged control, compares its selected text with each entry, and adds the matching value to an example email string: Sub GetDropdownValue() Dim controls As ContentControls Dim cc As ContentControl Dim entry As ContentControlListEntry Dim emailBody As String Set controls = ActiveDocument.SelectContentControlsByTag("EmailDropdown") If controls.Count <> 1 Then MsgBox "Expected one control tagged EmailDropdown." Exit Sub End If Set cc = controls(1) If cc.Type <> wdContentControlDropdownList Then MsgBox "The tagged control is not a dropdown list." Exit Sub End If For Each entry In cc.DropdownListEntries If entry.Text = cc.Range.Text Then emailBody = "Selected value: " & entry.Value MsgBox emailBody Exit Sub End If Next entry MsgBox "No dropdown entry matched the selected text." End Sub
Select an entry in the document, then run GetDropdownValue from Developer > Macros. Replace the example emailBody assignment with your existing email string logic, using entry.Value where the stored value is needed.

Edit Word documents with WPS Writer
WPS Office is a free, lightweight alternative with a familiar interface for editing Word documents. Its Microsoft Office format support helps you move existing files into WPS; check any document's macros and content controls before relying on them, as Word VBA behavior may differ.

Frequently Asked Questions
Where do I set a dropdown entry's display text and value?
Select the dropdown content control in Word and open Developer > Properties. Add or edit entries in the dropdown list properties, specifying the display name and value for each one.
Why does cc.Range.Text return the display text instead of the stored value?
The content control's range contains the text displayed in the document. The associated value is a property of a ContentControlListEntry, so iterate through cc.DropdownListEntries and read entry.Value after matching entry.Text.
What if the macro says no dropdown entry matched?
Select an actual dropdown entry rather than leaving the placeholder displayed. Then check Developer > Properties to confirm the entry's display text matches the text in the control.
How do I keep the macro in the document?
Use File > Save As and choose Word Macro-Enabled Document (.docm). Only enable macros from documents you trust.




