Click on the Combo Box Content Control button in the Controls group to insert a combo box into your document.In the Developer tab, click on the "Design Mode" button in the Controls group to enable design mode.Go to "File" > "Options" > "Customize Ribbon" and check the box next to "Developer" in the right-hand column. If you don't see the Developer tab in the ribbon, you'll need to enable it first. Open your Word document and navigate to the Developer tab.Here are all the steps how you can do it: The functionality to dynamically populate a field with the initials based on a selected item from a combo box drop-down list requires the use of VBA. Achieving the desired functionality without using VBA is not possible in Word with the version you mentioned (Microsoft 365 MSO, Version 2304, Build 7.20200). The steps may vary slightly if you are using a different version of apologize for the confusion. Please note that these instructions are based on the version of Word you mentioned (Microsoft 365 MSO, Version 2304, Build 7.20200). Now, when users interact with the combo box, they will see the full names in the drop-down list, but once they make a selection, only the initials will populate the field. You can add multiple items by clicking the "Add" button.Ĭlick "OK" to close the Content Control Properties dialog box.Ĭlick on the "Design Mode" button again to disable design mode. In the "Display Name" column, enter the full names of the persons (e.g., "John Smith" or "Mary Jones") and in the "Value" column, enter their corresponding initials (e.g., "JS" or "MJ"). In the Content Control Properties dialog box, go to the "Dropdown List Properties" tab. Right-click on the combo box and choose "Properties" from the context menu. In the Developer tab, click on the "Design Mode" button in the Controls group to enable design mode. Open your Word document and navigate to the Developer tab. Remember to save your document as a macro-enabled (.docm) file if you want to use VBA code. Replace "YourComboBoxTitle" with the title you have given to the combo box content control. If cc.Type = wdContentControlComboBox Then Set cc = ActiveDocument.SelectContentControlsByTitle("YourComboBoxTitle").Item(1) If you want to retrieve the selected value (initials) from the combo box using VBA, you can use the following code: Sub GetSelectedValue() Now, when you use the combo box, the user will see the full names in the drop-down list, but only the initials will be populated in the field when a selection is made. Each entry should be in the same row.Ĭlick OK to close the Content Control Properties dialog box. In the Content Control Properties dialog box, go to the Drop-Down List Properties tab.Įnter the full names (e.g., "John Smith", "Mary Jones") in the Display Name column and enter the corresponding initials (e.g., "JS", "MJ") in the Value column. Right-click on the combo box and choose Properties from the context menu. You can do this by going to Word Options, selecting Customize Ribbon, and checking the box for Developer.Ĭlick on the Combo Box Content Control button in the Controls group to insert a combo box into your document. If you don't see the Developer tab in the ribbon, you may need to enable it first. Open your Word document and go to the Developer tab. Achieve the desired functionality in Microsoft Word with a Combo Box Content Control, you can use a combination of the Display Name and Value properties.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |