leogerma.blogg.se

Word developer tools drop down box
Word developer tools drop down box










  1. #Word developer tools drop down box code#
  2. #Word developer tools drop down box password#

Supposing you have three groups of dependent drop-down lists in your document. When selecting Fruit from the first drop-down list, only the fruit categories can be selected in the second one. Now the dependent drop-down lists are created.

word developer tools drop down box

#Word developer tools drop down box password#

In the Restrict Editing pane, you need to:ġ0.1), Check the Allow only this type of editing in the document box ġ0.2) Select Filling in forms option from the drop-down list ġ0.3) Click the Yes, Start Enforcing Protection button ġ0.4) In the Start Enforcing Protection dialog, enter the password and click the OK button. Now click Developer > Restrict Editing as below screenshot shown.ġ0. In the dialog box, please select the above Macro name (here is Popolateddfood) from the Exit drop-down list, and then click the OK button.ĩ. Right click the first drop-down list and click Properties to open the Drop-down Form Field Options dialog box.

#Word developer tools drop down box code#

Save the code and go back to the document.Ĩ. ddfood and ddCategory should match the Bookmark options you entered in the above two Drop-down Form Field Options dialog boxes.ħ. In the code, please change items under each case as you need.Ģ. If ((xDirection Is Nothing) Or (xState Is Nothing)) Then Exit Subġ. Set xState = ActiveDocument.FormFields("ddCategory") Set xDirection = ActiveDocument.FormFields("ddfood") VBA code: Create dependent drop-down list in Word Sub Populateddfood() In the Microsoft Visual Basic for Applications window, click Insert > Module, then copy below VBA code into the Module window. Press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.Ħ. Right click the second drop-down list, click Properties to open its Drop-down Form Field Options dialog box, and in the dialog, enter ddCategory into the Bookmark box and click the OK button. In the opening Drop-down Form Field Options dialog box, you need to:ģ.1 Enter the category into the Drop-down item box and then click the Add button, repeat the operation until all categories are added to the Items in drop-down list box.Ĥ.

word developer tools drop down box

Right click the first drop-down list (this drop-down list should be the parent one), and click Properties. Click Developer > Legacy Forms > Drop-Down Form Field.

word developer tools drop down box

Firstly, you need to insert two drop-down lists in your Word document. Please follow the instruction step by step.ġ. The below VBA code can help you creating dependent drop-down lists in a Word document. As the left screenshot shown, you need to limit the choices in the second drop-down list based on the option in the first drop-down, how can you do? This article will show you method to create dependent drop-down lists in Word document.Ĭreate dependent drop down lists in Word with VBA code












Word developer tools drop down box