logo
search
Template Issues

How to Display a Word Table Based on a Dropdown Selection

Steven ParkerSteven Parker Oct 22, 2026 868 views

Question details

The user wants to display different editable tables dynamically in a Word document based on a selection made from a dropdown menu.

How to Display a Word Table Based on a Dropdown Selection
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.
Before you start

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.

Solution 1Recommended

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.

1
Create and Save Building Blocks

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).

2
Insert a Legacy Dropdown Field

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.

3
Assign an Exit Macro

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.

4
Protect the Document

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 a Macro-Enabled Template with Legacy Form Fields
Macro Security: Users will need to enable macros when opening the template for the dynamic table switching to function correctly.

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. 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. 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. 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. 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.
Full support for Microsoft Word form controls and templates (.dotx, .dotm)Intuitive Developer tab for quick access to legacy tools and macrosLightweight, fast, and completely free for everyday document processingSeamless format compatibility ensuring forms look exactly as intended
microsoft office alternative - wps office

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.