PowerShell + Registry
Because these values are stored in the registry, they can be queried
without opening the respective
Office application.
Such queries are performed by the following
PowerShell script:
forEach ($appId in 'Access', 'Excel', 'Lync', 'OneNote', 'Outlook', 'PowerPoint', 'Publisher', 'Visio', 'Word') {
$regKey = "hklm:\Software\Classes\$($appId).application\curVer"
if (-not (test-path $regKey)) {
$version = 'n/a'
}
else {
$defaultValue = (get-item $regKey).getValue('')
#
# Get number from string that looks like »Excel.Application.16«
#
$version = $defaultValue -replace '.*\.(\d+)', '$1'
}
write-output(' {0,-10} {1,3}' -f $appId, $version)
}