title: Cannot get the Custom UI context menus working in Word 2016
body: <p>I have written several custom UI Ribbon menus for both Excel and Word. I have working custom context (right click) menus with my Excel apps, but cannot seem to get them to work in Word. I used the same coding as with my working menus in Excel and wrote the XML using the "Custom UI Editor for Microsoft Office" so there should be no issue.</p>
  
  <p>I will post my code. The real question is will this type of custom menu work in Word at all?</p>
  
  <p>The XML in the ribbon code is (showing the last lines only):</p>
  
  <pre><code>&lt;/tabs&gt;
  &lt;/ribbon&gt;
  
      &lt;contextMenus&gt;
              &lt;contextMenu idMso="ContextMenuCell"&gt;
                      &lt;dynamicMenu id="mnuMain" label= "BidSmart Contract" imageMso="DocumentTemplate" getContent="GetContent" insertBeforeMso="Cut"/&gt;
              &lt;/contextMenu&gt;
          &lt;/contextMenus&gt;
  </code></pre>
  
  <p></p>
  
  <p>The getContent sub, "GetContent" looks like this:</p>
  
  <pre><code>Sub GetContent(control As IRibbonControl, ByRef returnedVal)
  </code></pre>
  
  <p>Dim xml As String</p>
  
  <pre><code>xml = "&lt;menu xmlns=""http://schemas.microsoft.com/office/2009/07/customui""&gt;" &amp; _
      "&lt;button id=""mnuCtxtEmail"" label=""Send and Email"" imageMso=""TableSharePointListsRefreshList"" screentip=""Send an Email to the Client, Designer or Contractor..."" onAction=""mnuEmail""/&gt;" &amp; _
      "&lt;button id=""mnuCtxtEnvelope"" label=""Print an Envelope"" imageMso=""WhatIfAnalysisMenu"" screentip=""Create an Envelope addressed to the Client, Designer or Contractor..."" onAction=""mnuEnvelope""/&gt;" &amp; _
      "&lt;/menu&gt;"
  
  returnedVal = xml
  </code></pre>
  
  <p>End Sub</p>