title: Get macro command names for menu items in Word
body: <p>I'm developing an addon for MS Word 2010 using VSTO. The Word has a "Customize keyboard" dialog:</p>
  
  <p><img src="https://i.stack.imgur.com/GvDIM.gif" alt="MS Word 2010 Customize Keyboard dialog"></p>
  
  <p>"Commands" list contains built-in macro commands each assigned to some menu or action. They can be executed from VSTO with <code>Application.Run()</code> method. </p>
  
  <p>I need to obtain records in form "Menu item name" - "Macro command name" - "Keyboard Shortcut" for the currently installed instance of Word.</p>
  
  <p>What I tried so far:</p>
  
  <pre><code>Application.CustomizationContext = Application.NormalTemplate;
  foreach (CommandBar bar in Application.CommandBars)
  {
      // Name of menu group
      Application.Selection.InsertAfter(bar.NameLocal + "\n");
      foreach (CommandBarControl control in bar.Controls)
      {
          // Human-readable name
          Application.Selection.InsertAfter("\nName:" + control.accName
                     // Broad description
                     + "\nDescription:" + control.DescriptionText
                     // Keyboard shortcut
                     + "\nShortcut:" + control.accKeyboardShortcut);
      }
  }
  </code></pre>
  
  <p>Unfortunately <code>CommandBarControl</code> doesn't contain macro command name field. I'm wondering how to gather this and glue all together?</p>