title: "Text" CommandBar not always present in Microsoft Word
body: <p>I am building a C# Add-In for Microsoft Word. My goal is to add a button in the right click  menu. It is easy to add a CommandBarButton in the "Text" CommandBar.</p>
  
  <pre><code>    Word.Application application;
      Office.CommandBar textCommandBar;
      Office.CommandBarButton myButton;
  
      private void InitContextMenuButton()
      {
          application.CustomizationContext = application.ActiveDocument;
          textCommandBar = application.CommandBars["Text"];
          myButton= textCommandBar.Controls.Add(Office.MsoControlType.msoControlButton, 1, "My Custom Button", 1, false) 
              as Office.CommandBarButton;
          myButton.Tag = "My Custom Button";
          myButton.accName = "My Custom Button";
          myButton.Caption = "My Custom Button";
          myButton.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(Button_Click);
          myButton.Visible = true;
      }
  </code></pre>
  
  <p>This work pretty well most of the time. </p>
  
  <p><a href="https://i.stack.imgur.com/W4ghr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W4ghr.png" alt="enter image description here"></a></p>
  
  <p>My issue is that sometime the button is not always there. Sometime, when I click on list or a table, the "Text" CommandBar seems to not present in the context menu.</p>
  
  <p><a href="https://i.stack.imgur.com/Zk34M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zk34M.png" alt="enter image description here"></a></p>