<p>One way to check for the installed Office version would be to check the <code>InstallRoot</code> registry keys for the Office applications of interest.</p>
<p>For example, if you would like to check whether Word 2007 is installed you should check for the presence of the following Registry key:</p>
<pre><code class="lang-auto">HKLM\Software\Microsoft\Office\12.0\Word\InstallRoot:😛ath
</code></pre>
<p>This entry contains the path to the executable.</p>
<p>Replace 12.0 (for Office 2007) with the corresponding version number:</p>
<p>Office 97 - 7.0<br>
Office 98 - 8.0<br>
Office 2000 - 9.0<br>
Office XP - 10.0<br>
Office 2003 - 11.0<br>
Office 2007 - 12.0<br>
Office 2010 - 14.0 (sic!)<br>
Office 2013 - 15.0<br>
Office 2016 - 16.0<br>
Office 2019 - 16.0 (sic!)</p>
<p>The other applications have similar keys:</p>
<pre><code class="lang-auto">HKLM\Software\Microsoft\Office\12.0\Excel\InstallRoot:😛ath
HKLM\Software\Microsoft\Office\12.0\PowerPoint\InstallRoot:😛ath
</code></pre>
<p>Or you can check the common root path of all applications:</p>
<pre><code class="lang-auto">HKLM\Software\Microsoft\Office\12.0\Common\InstallRoot:😛ath
</code></pre>
<p>Another option, without using specific Registry keys would be to query the MSI database using the <code>MSIEnumProducts</code> API as described <a href="http://office.microsoft.com/en-us/orkXP/HA011364611033.aspx">here</a>.</p>
<p>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.</p>
<p><strong>Update: Office 2019 and Office 365</strong></p>
<p>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 <code>Application.Version</code> (e.g. in Word) still is <code>16.0</code>.</p>
<p>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 <span class="mention">@antonio</span> below).</p>
<p>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:</p>
<pre><code class="lang-auto">// Using the file path to winword.exe
// Retrieve the path e.g. from the InstallRoot Registry key
var fileVersionInfo = FileVersionInfo.GetVersionInfo(@"C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE");
var version = new Version(fileVersionInfo.FileVersion);
// On a running instance using the Process class
var process = Process.GetProcessesByName("winword").First();
string fileVersionInfo = process.MainModule.FileVersionInfo.FileVersion;
var version = Version(fileVersionInfo);
</code></pre>
<p>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.</p>