VBA & Macro Problems

Retrieve a Dropdown Value in a Word VBA Macro

Adam DavisAdam Davis Nov 18, 2026 870 views

Question details

Retrieve the stored value associated with the selected display text in a Word dropdown content control.

Retrieve a Dropdown Value in a Word VBA Macro
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.
Before you start

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.

Solution 1Recommended

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.

1
Set the control tag

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.

2
Open the VBA editor

Go to Developer > Visual Basic, then choose Insert > Module in the VBA editor.

3
Add the lookup macro

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

4
Test and use the value

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.

Match the selected text to a dropdown entry's value
Use unique display text: The lookup returns the first matching entry. If multiple entries share the same display text, it cannot distinguish their values. If the placeholder is still displayed, no entry may match.
Free Microsoft Office alternative

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.

Open and edit Microsoft Word DOC and DOCX documentsWork with document content in a familiar word-processing interfaceUse a free, lightweight office suite for everyday editingMove existing Office documents into WPS without starting from scratch
microsoft office alternative - wps office

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.