Document Editing Problems

How to Create Conditional Results from Word Drop-Down Controls

Aamir Naveed AkramAamir Naveed Akram Nov 13, 2026 869 views

Question details

The user needs a Word form to evaluate two drop-down or checkbox selections and automatically calculate a Low, Medium, or High result in a table cell or another content control.

How to Create Conditional Results from Word Drop-Down Controls
Product
Microsoft Word
Device & OS
not provided
Scenario
Creating an interactive Word form that calculates and displays a Low, Medium, or High result from two dependent drop-down or checkbox questions.
Observed behavior
The calculated result should appear automatically in a table cell or Result content control when either question changes.
Before you start

Open the document in Microsoft Word and enable the Developer tab. Save the file as a Word Macro-Enabled Document (.docm) so the VBA event code can be stored and run.

Solution 1Recommended

Use Tagged Drop-Down Content Controls and a BeforeStoreUpdate Macro

Use this method for a clean Word form: two drop-down controls and one result control are tagged, mapped to a Custom XML part, and updated in the document-level content control event.

Drop-down content controls are easier to manage than independent check boxes because each question can only have one selected value at a time.

Mapping the controls to Custom XML nodes lets the Document_ContentControlBeforeStoreUpdate event read the current Q1 and Q2 values and write the calculated result without screen scraping bookmarks.

1
Show the Developer tab

In Word, go to File > Options > Customize Ribbon, enable the Developer tab, and then open the form document.

2
Insert two drop-down content controls

Place the cursor where the first question should be, click Developer > Controls > Drop-Down List Content Control, and add the answer items for Q1. Repeat for Q2.

3
Tag the controls and insert the result control

Open Properties for each drop-down and set the Tag to Q1 or Q2. Insert a Plain Text Content Control in the table cell, and set its Tag to Result.

4
Map the controls to a Custom XML part

Open the XML Mapping Pane, add a Custom XML part with Q1, Q2, and Result nodes, and map each tagged control to its matching node.

5
Add the document-level event code

In the Visual Basic Editor, open ThisDocument, create the Document_ContentControlBeforeStoreUpdate event, read the Q1 and Q2 node values, evaluate the pair with Select Case, and assign Low, Medium, High, or Not determined to the Result node.

Use Tagged Drop-Down Content Controls and a BeforeStoreUpdate Macro
Save as a macro-enabled document: Use the .docm format so the ThisDocument event code is stored and can run when the form is reopened.
Free Microsoft Office alternative

Use WPS Office as a Free, Lightweight Alternative for Word Form Documents

Complex Word forms that rely on Custom XML and the Document_ContentControlBeforeStoreUpdate event may not run identically in WPS Office. For everyday .docx forms and documents, WPS Writer is a free, lightweight Office alternative that opens Word files, keeps familiar layouts, and offers a familiar ribbon interface for easier migration.

Free to download and use for personal and everyday office workOpens and saves Microsoft Word .docx and .doc files for smoother compatibilityFamiliar ribbon interface reduces the learning curve when switching from WordLightweight performance for standard form documents and general editingUseful for editing Word form layouts when complex Custom XML or VBA event code is not required
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Word form show Not determined after I change a drop-down?

The Select Case logic likely does not cover that combination. In ThisDocument, check that every possible Q1 and Q2 pair is listed in the case statement and that both node values are not empty before the result is calculated.

Can I use check boxes instead of drop-down lists?

Yes. However, check boxes do not behave like radio buttons automatically, so the Document_ContentControlBeforeStoreUpdate event must clear the other check boxes in the same group before calculating the result. Drop-down controls are easier because only one item can be selected.

Where do I put the ContentControlBeforeStoreUpdate event code?

Open the Visual Basic Editor, select ThisDocument under the document project, and choose Document and ContentControlBeforeStoreUpdate from the object and event dropdowns. Do not place this event in a standard module.

Do I need to save the Word document in a specific format?

Yes. Save the file as a Word Macro-Enabled Document with the .docm extension so the ThisDocument VBA event code is preserved and can run when the form is reopened.

Will this VBA method work in WPS Office?

WPS Office may not run all Word Custom XML and content control event macros exactly. For complex Word forms, test in Microsoft Word. For everyday .docx forms, WPS Writer is a free alternative for editing and layout work.