#1
|
|||
|
|||
Content Control DropDown List
Hi,
I am a newbie on this site and to VBA. I am trying to create a drop down list using Content control and I would like to add a button to the ribbon so that when users select it the dropdown list appears and they can select the item of their choosing. Is that even a possible to do? HELPP! |
#2
|
||||
|
||||
Yes, both things are possible but you aren't being clear about what you want.
A content control sits in the document itself and they come in different types, some of which provide a drop down list that can be clicked on and allow selection of an entry. This doesn't necessarily require VBA and is relatively simple. You can also customise the ribbon to add something that drops down to reveal a list of selections. This can be way more complicated and require VBA and xml CustomUI skills. Can you explain exactly what it is you want to do?
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
I actually just created the simple dropdown list from the content control. I am using Office 2016. It is basically a list for 175 items. I think it is too much but that is what is required. The document will be saved as a template, so that users will put in their content, and then if they need to select an item from the list they will go to the custom tab in their ribbon, and then click on the dropdown list, select and item from the list and input it into their document. Now there is no way for me to know where they will be inputting the item in the document, so that is what I was trying to figure out. I don't think using bookmarks or a form would have helped in this case.
|
#4
|
||||
|
||||
If you want to select from the ribbon, you should create a macro with a userform containing a list or combo box (or you could create a menu on the ribbon that lists the items, though 175 is a stretch to have in a single menu)
See https://www.gmayor.com/Userform.htm and https://www.gmayor.com/Userform_ComboBox.html Or you could simply insert a list box content control and populate it from Excel -to which end may find https://www.gmayor.com/insert_content_control_addin.htm useful
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#5
|
||||
|
||||
So you are saying the requirement is to put a menu item in ribbon with 175 buttons in it - each with a different bit of text.
I presume the functionality you then want is for the user to put their cursor in a specific location in the document and then open that menu item and scroll down to see the word they want, then click on it to have that word appear where the cursor was on the page. What is special about the words/buttons that it wouldn't be faster for the user to just type the word in their preferred location? A simpler workflow since you have already created and populated a Content Control with the list would be to save that CC as a building block and then have the user insert that (one) building block in their required location and then click on that to see and choose the relevant 175 options.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Importing content control data from excel and populate two fields on selected dropdown | badarlodhi | Word VBA | 8 | 02-08-2023 10:47 AM |
Dropdown content control and tables | hrzagi | Word | 1 | 12-17-2017 09:38 PM |
How to get a Drop Down List Content Control box to fill in other areas | snips1982 | Word | 2 | 03-22-2017 03:37 AM |
Content Control Dropdown Dependencies | asteinroeder | Word VBA | 5 | 10-28-2015 03:56 PM |
Download Content Control List | cjacob28 | Word | 0 | 06-26-2011 11:23 PM |