VBA & Macro Problems

Automatically Fill Word 2016 Table Cells from a Drop-Down List

Natalie TaylorNatalie Taylor Nov 25, 2026 869 views

Question details

Automatically populate related Word table cells based on a drop-down selection.

Automatically Fill Word 2016 Table Cells from a Drop-Down List
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.
Before you start

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.

Solution 1Recommended

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.

1
Save as a macro-enabled document

Choose File > Save As and select Word Macro-Enabled Document (*.docm).

2
Insert and name the combo box

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.

3
Add the VBA code

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

4
Initialize and test the list

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.

5
Allow trusted content when reopening

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.

Use an ActiveX combo box and VBA to fill table cells
Customize the cell references: Tables(1).Cell(1, 2) means the first table, first row, second cell. The code replaces the contents of the target cells. Enable macros and ActiveX controls only in documents you trust.
Free Microsoft Office alternative

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.

Create and edit document tables in WPS WriterOpen and edit Microsoft Word DOC and DOCX filesUse a familiar interface for a smoother transition from OfficeWork with a free, lightweight office suite
microsoft office alternative - wps office

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.