I maintain a diagnostic that programmatically determines the version of MS Office applications, including Excel and Word. It has worked correctly for MS Office versions 2003, 2007, 2010, 2013, and 2016. But now I find that it incorrectly reports MS Office 2019 applications as MS Office 2016.
Eight years ago, M. A. Hanin posted a similar question:
Identifying Excel version programmatically
mathieu's reply, the accepted answer, correlated numbers used to identify MS Office in the registry versus the product versions. For instance, the number 14.0 corresponded to Office 2010. Doug Glancy directly addressed the question with VB code that prints the version property of Excel Application object:
https://learn.microsoft.com/en-us/office/vba/api/excel.application.version
Here is a VB Script that diagnoses which, if any, version of Excel is installed to the system:
On Error Resume Next
Set excelApp = CreateObject("Excel.Application")
If Err.Number <> 0 Then
WScript.Echo "Excel is not installed"
Else
Wscript.Echo "Excel Version: " & excelApp.Version
End If
The diagnostic faithfully reports MS Office versions consistent with the post from 2011. Since then, it reports 15.0 for Office 2013, and 16.0 for Office 2016. Recently, though, I was surprised to find that it also reports 16.0 for Office 2019. That is just not right! The 2016 and 2019 feature sets are clearly distinct, so they should not be lumped together:
Is there an alternate way to programmatically distinguish Office 2016 from Office 2019?