Show/Hide based on Office version?

Add-in Express™ Support Service
That's what is more important than anything else

Show/Hide based on Office version?
Guidance to show/hide ribbon icons/groups based on Office version. 
Mark De Lorenzo




Posts: 39
Joined: 2015-06-22
Is it possible to show/hide ribbon icons/groups based on Office version?
Could you please point me in the area of the documentation that would lead me in the correct direction?
Posted 13 May, 2021 05:32:23 Top
Mark De Lorenzo




Posts: 39
Joined: 2015-06-22
Found this so far...

Select Case Me.HostMajorVersion
  Case 14
    CurrentHost = "2010"
  Case 15
    CurrentHost = "2013"
  Case 16
    CurrentHost = "2016"
End Select

Any additional help or alternate ways would be greatly appreciated.
What is the version for 2019?
Posted 13 May, 2021 05:49:35 Top
Andrei Smolin


Add-in Express team


Posts: 18219
Joined: 2006-05-11
Hello Mark,

This is a correct way. Applications from Office 2016, 2019 and 365 return 16. I don't know a way to distinguish these versions.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 13 May, 2021 06:14:35 Top