How To Find Ms Office Version
Does anyone know what would be the best way to detect which version of Office is installed? Plus, if there are multiple versions of Office installed, I'd like to know what versions they are. A bonus would be if I can detect the specific version(s) of Excel that is(/are) installed.
code4lifeFollow the steps below to find which version you have as well as related details, such as which bit version you run (32-bit or 64-bit) or the latest service pack that's been applied to your installation.
code4life8 Answers
One way to check for the installed Office version would be to check the InstallRoot
registry keys for the Office applications of interest.
For example, if you would like to check whether Word 2007 is installed you should check for the presence of the following Registry key:
This entry contains the path to the executable.
Replace 12.0 (for Office 2007) with the corresponding version number:
The other applications have similar keys:
Or you can check the common root path of all applications:
Another option, without using specific Registry keys would be to query the MSI database using the MSIEnumProducts
API as described here.
As an aside, parallel installations of different Office versions are not officially supported by Microsoft. They do somewhat work, but you might get undesired effects and inconsistencies.
Update: Office 2019 and Office 365
As of Office 2019, MSI-based setup are no longer available, Click-To-Run is the only way to deploy Office now. Together with this change towards the regularly updated Office 365, also the major/minor version numbers of Office are no longer updated (at least for the time being). That means that – even for Office 2019 – the value used in Registry keys and the value returned by Application.Version
(e.g. in Word) still is 16.0
.
For the time being, there is no documented way to distinguish the Office 2016 from Office 2019. A clue might be the file version of the winword.exe; however, this version is also incremented for patched Office 2016 versions (see the comment by @antonio below).
If you need to distinguish somehow between Office versions, e.g. to make sure that a certain feature is present or that a minimum version of Office is installed, probably the best way it to look at the file version of one of the main Office applications:
The file version of Office 2019 is 16.0.10730.20102, so if you see anything greater than that you are dealing with Office 2019 or a current Office 365 version.
How To Find Ms Office Version Download
Dirk VollmarHow about HKEY_CLASSES_ROOTWord.ApplicationCurVer?
If you've installed 32-bit Office on a 64-bit machine, you may need to check for the presence of 'SOFTWAREWow6432NodeMicrosoftOffice12.0', substituting the 12.0 with the appropriate version. This is certainly the case for Office 2007 installed on 64-bit Windows 7.
Note that Office 2010 ( 14.0) is the first Office for which a 64-bit version exists.
JasonJasonI found this CodeProject which helped me out with this very problem: http://www.codeproject.com/Articles/26520/Getting-Office-s-Version
peinearydevelopmentpeinearydevelopmentWhy not check HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp Paths[office.exe]
, where [office.exe]
stands for particular office product exe-filename, e.g. winword.exe
, excel.exe
etc.There you get path to executable and check version of that file.
How to check version of the file: in C++ / in C#
Any criticism towards such approach?
A bonus would be if I can detect the specific version(s) of Excel that is(/are) installed.
I know the question has been asked and answered a long time ago, but this same question has kept me busy until I made this observation:
To get the build number (e.g. 15.0.4569.1506
), probe HKLMSOFTWAREMicrosoftOffice[VER]CommonProductVersion::LastProduct
, where [VER]
is the major version number (12.0 for Office 2007, 14.0 for Office 2010, 15.0 for Office 2013).
On a 64-bit Windows, you need to insert Wow6432Node
between the SOFTWARE
and Microsoft
crumbs, irrespective of the bitness of the Office installation.
On my machines, this gives the version information of the originally installed version. For Office 2010 for instance, the numbers match the ones listed here, and they differ from the version reported in File > Help
, which reflects patches applied by hotfixes.