Automatically Fill Word 2016 Table Cells from a Drop-Down List
Question details
Automatically populate related Word table cells based on a drop-down selection.

- Product
- Microsoft Word 2016
- Device & OS
- not provided
- Scenario
- A user selects a predefined value from a drop-down list in a Word table.
- Observed behavior
- A standard drop-down list does not automatically populate the related table cells without customization.
Enable the Developer tab through File > Options > Customize Ribbon if it is not visible. Prepare a table with at least one row and three unmerged cells, and decide which selections and values you want to use.
Use an ActiveX combo box and VBA to fill table cells
Use this method when selecting an item should immediately write predefined values into other cells.
The example places a combo box in the first cell of the first table and writes values to the second and third cells of that row. Adjust the table, row, column, and choice values to match your document.
Choose File > Save As and select Word Macro-Enabled Document (*.docm).
Click the first cell of the first table. On the Developer tab, choose Legacy Tools > ActiveX Controls > Combo Box. Turn on Design Mode, select the control, and open Properties. Set its (Name) property to ComboBox1.
Choose Developer > Visual Basic, open ThisDocument under your document's project, and paste the following code: Private Sub Document_Open() InitializeChoices End Sub Public Sub InitializeChoices() ComboBox1.Clear ComboBox1.AddItem "Product A" ComboBox1.AddItem "Product B" End Sub Private Sub ComboBox1_Change() Select Case ComboBox1.Value Case "Product A" ThisDocument.Tables(1).Cell(1, 2).Range.Text = "Description A" ThisDocument.Tables(1).Cell(1, 3).Range.Text = "$10" Case "Product B" ThisDocument.Tables(1).Cell(1, 2).Range.Text = "Description B" ThisDocument.Tables(1).Cell(1, 3).Range.Text = "$20" End Select End Sub
Save the document and turn off Developer > Design Mode. In the VBA editor, place the cursor inside InitializeChoices and press F5 to populate the list. Return to the document and select Product A or Product B to test the corresponding cells.
Reopen the .docm file and use Enable Content if Word prompts you and you trust the document. If the list is empty, run InitializeChoices again from the VBA editor with F5.

Edit Word Tables with WPS Writer
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Word documents. Its format support can help you move existing files to WPS Writer, although Word-specific VBA and ActiveX controls may not work the same way.

Frequently Asked Questions
Can a standard Word drop-down list fill other cells by itself?
No. In Word 2016, automatically filling related cells requires customization, such as an ActiveX combo box with VBA code that responds to a selection.
Why is my combo box list empty after I reopen the document?
The initialization code may not have run if macros were disabled when the document opened. If you trust the file, enable its content, open Developer > Visual Basic, place the cursor inside InitializeChoices, and press F5.
How do I change which cells receive the values?
In Developer > Visual Basic, edit the Tables and Cell references in ComboBox1_Change. For example, Tables(1).Cell(1, 2) targets the second cell in the first row of the first table.
Which file format preserves the VBA code?
Choose File > Save As and select Word Macro-Enabled Document (*.docm). A regular DOCX file does not preserve VBA macros.




