

By default, the checkbox is in design mode (you can see the Design Mode icon being enabled within the Controls group) Word creates a check box at the cursor position. Under the section Legacy Form, click the check box icon as shown in the below image. Under the group Controls, click the Legacy Tools button. Now, you can view the Developer tab in the Ribbon. On the dialog box, under the category Popular (see on the left hand side), select the option Developer tab in the Ribbon. Click the Word Options button from the bottom of the list. If you are unable to find this tab in the Ribbon, most likely you need to enable this using the Word Options dialog box.ġ. These elements are available under the tab menu Developer in the Word Ribbon. You can use these elements to create a form in Word. Cells(1).Shading.Word has this nice feature which enables insertion of text fields, check boxes, drop-down lists, etc.

Cells(1).Shading.BackgroundPatternColor = wdColorOrange
#DROP DOWN MENU IN WORD NOT WORKING ON MAC CODE#
The complete code should be this:Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) Hello, joni,If there are two or more tables of drop down lists, you just need to copy and paste the below code into the original code, and change the text reference to your need. If ContentControl.Title = "Corrective action for cd" Then Cells(1).Shading.BackgroundPatternColor = wdColorYellow

If ContentControl.Title = "Corrective action" Then Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) Could you please inform me what I have done wrong? I tried to create two color code drop down lists in one Word template, however, I get an error message saying 'Ambiguous name detected: Document_ContentControON EXIT. Then save and close the code window, now, when you select one item from the drop down list, its relative color will be filled with the cell, see screenshot: And you can also change the color to your need.Ĩ. Note: In the above code, Statusis the title name when you creating the drop down list, and Complete, In Progress, Not Start are the items of the drop down list, you can change them to your own. Cells(1).Shading.BackgroundPatternColor = wdColorAutomatic

Cells(1).Shading.BackgroundPatternColor = wdColorBlue Cells(1).Shading.BackgroundPatternColor = wdColorGreen Cells(1).Shading.BackgroundPatternColor = wdColorRed VBA code: Insert color coded drop down list into table of a Word document: Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) In the Microsoft Visual Basic for Applications window, double click ThisDocument from the Project-Project pane to open the mode, and then copy and paste the following code into the blank module. Then you should apply a VBA code, please hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.ħ. After creating the first drop down list, you can copy and paste it to other cells as you need. Repeat the Step 3 to insert other drop down list items as you need.ĥ. (3.) In the Add Choice dialog, type the drop down list item into the Display Name text box.Ĥ. (2.) Click Add button go to the Add Choice dialog (1.) Enter the title name into the Title text box In the Content Control Properties dialog box, please do the following operations: The drop down is inserted into the specific cell, and then click Developer > Properties, see screenshot:ģ. Select a cell in the table where you want to insert the drop down, and then click Developer > Drop-Down List Content Control icon, see screenshot:Ģ. The following steps can help you to finish this task as you need, first, insert the drop down list, and then apply the color for the drop down. Insert color coded drop down list in Word document with VBA code How could you solve this job in Word document? It means when I select one option from the drop down, the cell color becomes red, and when I select another option in the drop down, the cell color becomes green as following screenshot shown. Supposing, I have a table in my Word document, and now, I want to insert color coded drop down list in a column of the table.
#DROP DOWN MENU IN WORD NOT WORKING ON MAC HOW TO#
How to insert color coded drop down list in Word table?
