How to Automatically Fill Successive Months in a Word Table
Question details
The user needs to automatically populate subsequent cells in a Word table with consecutive months based on the month selected or typed in the first cell.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Creating a structured table or form in a text document that requires sequential monthly headings or data, where manually typing each month is inefficient.
- Observed behavior
- Standard Word fields and tables do not natively support sequential text auto-filling like spreadsheets do, requiring advanced workarounds like VBA scripting.
Ensure that the Developer tab is enabled in your Word application settings, as you will need it to insert Content Controls and access the VBA editor.
Use VBA and Content Controls to Auto-Fill Months
This method uses a VBA macro triggered by a Content Control to automatically calculate and fill the remaining table cells with subsequent months.
Because Word does not have a native drag-to-fill feature for text sequences, a VBA macro is required. By attaching a Document_ContentControlOnExit event to a dropdown list in the first cell, the macro can automatically populate the rest of the table whenever a user selects a starting month.
Navigate to the Developer tab, place your cursor in the first cell of your table, and click on 'Drop-Down List Content Control'. Click 'Properties' to add the twelve months to the list and assign the control a unique title.
Press ALT + F11 to open the Visual Basic for Applications (VBA) editor. In the Project Explorer pane on the left, double-click 'ThisDocument' under your active document's project.
Insert a 'Document_ContentControlOnExit' subroutine. Write the VBA code to read the starting month's value, use the 'DateAdd' function to calculate successive months, and assign the formatted month names to the remaining cells in the table row or column.
Close the VBA editor and return to your document. Select a month from the dropdown list in the first cell, then click outside the cell. The macro will run and instantly fill the successive months.

Embed a Spreadsheet for Automatic Sequencing
Using an embedded spreadsheet bypasses the need for complex VBA code, allowing you to use native auto-fill capabilities directly inside your document.
Easily Auto-Fill Sequential Data with WPS Office
Avoid complex VBA scripting by utilizing the all-in-one WPS Office suite. You can easily insert a WPS Spreadsheet into your WPS Writer document and use the built-in auto-fill handle to generate successive months instantly.
- 1. Open WPS Writer: Launch your document in WPS Writer and place your cursor where you want the table to appear.
- 2. Insert a WPS Spreadsheet: Navigate to the 'Insert' tab on the top ribbon, click 'Table', and select 'Insert Spreadsheet' from the menu.
- 3. Input the First Month: In the spreadsheet view, type your starting month (e.g., 'January') into the first cell.
- 4. Drag to Auto-Fill: Hover over the bottom right corner of the cell until the fill handle cursor appears, then click and drag down or across to auto-fill the successive months.
- 5. Embed the Table: Click outside the spreadsheet area to seamlessly embed the populated data directly into your WPS Writer document as a clean table.

Frequently Asked Questions
Can I auto-fill dates in a standard Word table without macros?
Standard Word tables do not have an auto-fill feature for dates, months, or general text sequences. You can automatically fill numbers using the bullet or numbering list options, but for dates, you must either type them manually, use VBA, or embed a spreadsheet object.
How do I add a dropdown list for months in my document?
Enable the Developer tab in your application options, click 'Drop-Down List Content Control', and then click 'Properties' on the Developer ribbon. In the properties window, use the 'Add' button to manually insert the twelve months as selectable choices.
Why doesn't the VBA DateAdd function run automatically?
The DateAdd function in VBA only calculates dates when a script is executed. To make it run automatically upon user selection, the script must be placed inside an event trigger, such as 'Document_ContentControlOnExit', which fires as soon as the user interacts with and leaves the content control.




