How to Display a Word Table Based on a Dropdown Selection
Question details
The user wants to display different editable tables dynamically in a Word document based on a selection made from a dropdown menu.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Creating an interactive form where the visibility of specific tables depends on the user's choices in a dropdown field.
- Observed behavior
- Word does not natively support dynamic editable tables tied to dropdown menus without the use of macros, legacy form fields, or grouped building block content controls.
Ensure the Developer tab is enabled in your ribbon and save your document as a macro-enabled template (.dotm) if you plan to use VBA solutions or store building blocks.
Use a Macro-Enabled Template with Legacy Form Fields
This is the most robust method for creating dynamic forms, allowing you to use a macro to swap tables based on the dropdown choice while keeping the rest of the document strictly protected.
This approach requires a basic understanding of VBA macros. You will store the tables as Building Blocks and use an exit macro on a legacy dropdown field to insert the correct table.
Design the tables you want to display. Select each table and save it as a Building Block within your specific macro-enabled template file (.dotm).
Navigate to the Developer tab, open the Legacy Tools menu, and insert a Drop-Down Form Field. Double-click the field to add your menu options.
Write a VBA macro that identifies the selected dropdown result, locates a predefined bookmark in the document, deletes any existing table there, and inserts the corresponding Building Block. Assign this as the exit macro in the dropdown field's properties.
Go to the Developer tab, click Restrict Editing, check the box under Editing restrictions, and select 'Filling in forms' from the dropdown menu. Apply the protection.

Use Building Block Content Controls and Grouping
A simpler, macro-free alternative that uses the Group feature to protect the document while allowing users to select tables from a content control.
Create Dynamic Forms Easily with WPS Office
WPS Writer provides comprehensive Developer tools, including content controls and legacy form fields, enabling you to build interactive templates, dynamic tables, and protected forms with ease.
- 1. Enable the Developer Tab: Open WPS Writer, go to Menu > Options > Customize Ribbon, and check the 'Developer' option to reveal the necessary form tools.
- 2. Insert Form Controls: Navigate to the Developer tab and insert your preferred Drop-Down Form Fields or Content Controls into the document layout.
- 3. Configure Dropdown Items: Double-click the inserted dropdown field to open its properties, where you can add, remove, or rearrange the selectable list items.
- 4. Restrict Editing: Click 'Protect Document' in the Developer or Review tab, and set the protection type to 'Filling in forms' to secure the static text while allowing dropdown selections.

Frequently Asked Questions
Why can't I save a building block in a standard Word document?
Building blocks, including custom tables and AutoText, must be saved in a template file (.dotx or .dotm) rather than a standard document (.docx) so they can be securely stored and called upon whenever a new document is generated from that template.
Why are my legacy dropdown fields not working when I click them?
Legacy form fields will not function until the document is actively protected. You must go to Restrict Editing, choose 'Filling in forms', and start enforcement for the dropdown menus to become clickable.
Can I put a dropdown menu inside the dynamic table itself?
Yes, but if you are using the Content Control Grouping method, any dropdowns inside the inserted tables must also be Content Controls. Legacy form fields inside grouped areas will not function because they require strict forms protection to work.




