Cells(1).Shading. 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? In the Find section, select the Format option. Next, click Advanced Find in the drop-down menu. 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. Open your Word document that contains the highlighted text and select the down arrow next to Find in the Editing group of the Home tab. 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. To copy the text, swipe right until you hear "Copy text," then double-tap to copy it for pasting and editing in other apps.How to insert color coded drop down list in Word table? Once the text extraction is complete, you will hear an audio cue and the first line of the extracted text. The Microsoft 365 app will start processing the image.ħ. When you're satisfied with the cropping, swipe right until you hear "Confirm," then double-tap the screen. In the style definition, if the font is specified as '+Body' or '+Heading', then the font in use is determined by the Theme setting. If necessary, you can crop the image to show only the text. 'Default Paragraph Font' - anywhere in Word, including in the Styles pane and the Manage Styles dialog - refers to the font defined as part of the underlying paragraph style. Capture a picture using your device's camera or choose a saved picture from your photo library.Ħ. If needed, change the language of the text to be extracted by swiping left until you hear "Language of text to extract." Double-tap the screen, then swipe right to select your desired language.ĥ. Swipe right until you hear "Image to text," then double-tap to activate the camera mode.Ĥ. You will hear "Actions, tab." Double-tap the screen to open the Actions tab.ģ. Tap near the bottom of the screen with four fingers to access the navigation bar. Ensure the app has permission to access your device's camera.Ģ. Open the Microsoft 365 app on your iOS or Android device. To convert an image to text in the Microsoft app, follow these simple steps:ġ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |