Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 04-29-2019, 09:00 AM
gabster gabster is offline Windows 10 Office 2016
Novice
 
Join Date: Apr 2019
Posts: 2
gabster is on a distinguished road
Question 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!
Reply With Quote
  #2  
Old 04-29-2019, 04:09 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 1,155
Guessed has a spectacular aura aboutGuessed has a spectacular aura aboutGuessed has a spectacular aura about
Default

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
Reply With Quote
  #3  
Old 04-30-2019, 04:52 AM
gabster gabster is offline Windows 10 Office 2016
Novice
 
Join Date: Apr 2019
Posts: 2
gabster is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 04-30-2019, 09:21 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 2,721
gmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nice
Default

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)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 04-30-2019, 09:53 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 1,155
Guessed has a spectacular aura aboutGuessed has a spectacular aura aboutGuessed has a spectacular aura about
Default

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
Reply With Quote
Reply

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 7 08-01-2018 05:55 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


All times are GMT -7. The time now is 10:07 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft