![]() Then click the Combo Box Content Control button in the Controls group of the Ribbon Menu in your Word document. To add a Combo Box in your Word document, first you should add the Developer tab as we’ve described earlier. Unlike the Combo Box, a Drop-Down List cannot be used as a form field in Microsoft Word. You can treat a Combo Box like a fillable form and type whatever you want. The Combo Box lets people add their own custom entries in addition to those provided in the drop-down list. These two options are similar because both of them allow you to present a list of choices but they’re not the same. This will display the Content Controls with. ![]() In the Developer tab in Microsoft Word, you’ll see a button labeled Combo Box Content Control right next to Drop-Down List Content Control. To edit the Default text and color of Word Content Controls, go to the Developer tab and click Design Mode. Combo Box vs Drop-Down List in Microsoft Word Select the option you want and it’ll be recorded as your response in the drop-down list. Once a drop-down list is added to the document, you can click the down arrow on the right side of the menu to reveal the picker. When you’re done making changes, click OK to close the dialog box. The Remove button will allow you to get rid of a few options from the drop-down menu, and you can use the Move Up or Move Down buttons to change the order of various options. Content controls can be moved to another place in the document: click the button on the left of the control border to select the control and drag it without. For the disappearing issue, kindly check on the box with Content control cannot be deleted under Locking and check if the issue will be fixed. If you make a mistake, you can click Modify to change the text in any of your options. Your additions will appear below the Display Name sub-head. You can click the Add button to key in each option to the drop-down list. Finally, the Drop-Down List Properties section is the most important one. In the Locking section, you can choose if you want to allow the drop-down list to be edited or deleted. If you enable this, the drop-down list will automatically change to normal text when an option is selected. The option labeled Remove content control when contents are edited is an important check box in the Content Control Properties window. A subtle color works best for most people because the drop-down menu shouldn’t take attention away from other parts of the Word document. You can add a title, a tag, and pick the design and color of the box first. You can use a similar technique to display the dropdown list item's defined "value" after the user makes a selection and exits the control.įor example, the following illustrates a content control with its defined display name and value properties.In the Content Control Properties window, you’ll see several options to help you customize the drop-down list. Note: The VBA script above is placed in the "ThisDocument" module "Document" pane of the document or template VB project. Ordinal = IIf(strOrd = vbNullString, "th", strOrd) Repeat this step until all of the choices are in the drop-down list. Type a choice in the Display Name box, such as Yes, No, or Maybe. To create a list of choices, click Add under Combo Box Properties or Drop-Down List Properties. _Īre the only numbers ending 1, 2 or 3 where the ordinal is th instead of st, nd or rd. Select the content control, and then on the Developer tab, in the Controls group, click Properties. '11, 12, and 13 numbers including one of them e.g., 112, 512 etc. 'Adapted from function posted Microsoft Answers by Paul Edstein. Private Sub Document_ContentControlOnExit(ByVal CC As ContentControl, Cancel As Boolean)įunction Ordinal(lngNum As Long) As String ![]() The following illustrates a portion of a content control dropdown list containing the numbers. Let's consider the case where the user is asked to select a number (e.g., day of the month) from a dropdown list and you want the numbered selected to be displayed in ordinal format.Ĭontent control dropdown list members can consist of numbers but the list members themselves can't be a mix of numbers and superscript text.įor example, you can't define 1 st, 2 nd, 3 rd, 4 th, etc. ADCAP Dropdown List Display Calculated Value (Ordinal numbers) ![]() Hereafter, I will refer to these "magic" controls as "ADCAP" (or Advanced Capability) content controls. With the addition of some simple VBA in the Document_ContentControlOnExit event, you can make your dropdown list or combo box content controls appear to do "magic" and significantly expand the usefulness of these type controls. That is useful in many cases sure, but what if you need your user to select a listed value but then have the control display a different related value?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |