title: Getting the selected item from the dropdown in a ribbon in Word 2007 using macro
body: <p>I see the following question which explains how to get the selected item from the dropdown:-</p>
  
  <p><a href="http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/d1cf7b3e-68cf-4b82-b806-a3431acde3b6/" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/d1cf7b3e-68cf-4b82-b806-a3431acde3b6/</a></p>
  
  <p>The above thread advises to have a hashtable of the items upfront, cache the selected id in the onAction() of the dropdown and use that selected id to find the item from the hashtable in the onAction() of the button.</p>
  
  <p>BUT, in my case, I populate the ribbon XML from the database. This ribbon XML obviously has the XML for dropdown and I am useing macros to interact with the dropdown and other controls in the ribbon. I am not sure how to have a collection upfront which can be used by the macro similar to approach described in the above thread.</p>