title: Display a custom tab on Word Ribbon depending on the version of Word detected?
body: <p>I have customized the Office Ribbon adding a new tab to the Word ribbon by creating a custom XML file. The customization is in a template in the Word start-up directory. I am using Word 2016. It works under Word 2016; however it does not work in Word 2010. When opening a document in Word 2010 I get the dreaded "Error in hidden module" message. After hours of debugging and researching I cannot find the cause of this error in my VBA code.
  All the users in my company should be using Word 2016, however I must assume that some users will still be using Word 2010.
  If a user opens a document using Word 2010 I don't want my custom tab to be visible, that is I don't want the OnLoad event to fire.
  I tried the following code in the OnLoad Event callback:</p>
  
  <pre><code>If Application.Version = "16" Then     
     Set myribbon = ribbon
  Else
      End
  End If
  </code></pre>
  
  <p>In the other callbacks such as ToggleOn Action, getlabel, getTag, GetImage I checked for the Word Version like this:</p>
  
  <pre><code>Public Sub…
     If Application.Version = "16" then
       Do callback code
  Else
       End        
     End If     
  End Sub
  </code></pre>
  
  <p>However, the ribbon always loads and I could not find a way to stop it from loading. I also believe that you cannot hide a custom tab on the ribbon using VBA.
  To solve this problem I did the following:
  I put a template in the startup directory that checked for the correct version of Word. If the correct version was found, it loaded a template as an add-in from the users template directory with the ribbon customisation and my VBA code.
  It works, but it means I have to distribute two templates to the users. Ideally I'd like to have to distribute only one template.
  Is there a way to enable or prevent the OnLoad event firing, that is display a custom tab, depending on the version of Word detected?</p>