<p>Bonjour,</p>
<p>Détecter la version exacte de Microsoft Office installée sur un système Windows est une tâche courante pour les administrateurs système, les équipes de support et les développeurs qui doivent adapter leur comportement en fonction de la version présente. Il existe de nombreuses méthodes, du plus simple au plus avancé. Voici un guide exhaustif.</p>
<h2><a name="p-34554-mthode-1-depuis-linterface-utilisateur-office-mthode-visuelle-1" class="anchor" href="#p-34554-mthode-1-depuis-linterface-utilisateur-office-mthode-visuelle-1" aria-label="Heading link"></a>Méthode 1 : Depuis l’interface utilisateur Office (méthode visuelle)</h2>
<h3><a name="p-34554-office-2019-2021-microsoft-365-abonnement-2" class="anchor" href="#p-34554-office-2019-2021-microsoft-365-abonnement-2" aria-label="Heading link"></a>Office 2019, 2021, Microsoft 365 (Abonnement)</h3>
<ol>
<li>Ouvrez une application Office (Word, Excel, etc.)</li>
<li>Cliquez sur <strong>Fichier</strong> dans le ruban</li>
<li>Sélectionnez <strong>Compte</strong> (ou <strong>Aide</strong> selon la version)</li>
<li>La version s’affiche sous <strong>Informations sur le produit</strong></li>
<li>Cliquez sur <strong>À propos de Word/Excel</strong> pour voir le numéro de build complet</li>
</ol>
<h3><a name="p-34554-office-2016-et-versions-antrieures-3" class="anchor" href="#p-34554-office-2016-et-versions-antrieures-3" aria-label="Heading link"></a>Office 2016 et versions antérieures</h3>
<ol>
<li>Ouvrez Word ou Excel</li>
<li>Cliquez sur <strong>Fichier > Aide</strong></li>
<li>La version complète apparaît sous <strong>À propos de Microsoft Word</strong></li>
</ol>
<h2><a name="p-34554-mthode-2-via-powershell-mthode-recommande-pour-les-administrateurs-4" class="anchor" href="#p-34554-mthode-2-via-powershell-mthode-recommande-pour-les-administrateurs-4" aria-label="Heading link"></a>Méthode 2 : Via PowerShell (méthode recommandée pour les administrateurs)</h2>
<h3><a name="p-34554-dtection-via-le-registre-windows-5" class="anchor" href="#p-34554-dtection-via-le-registre-windows-5" aria-label="Heading link"></a>Détection via le registre Windows</h3>
<p>Le registre Windows contient toutes les informations de version d’Office. Voici un script PowerShell complet :</p>
<pre data-code-wrap="powershell"><code class="lang-powershell"># Script complet de détection de la version Microsoft Office
function Get-OfficeVersion {
$officeVersions = @{
"16.0" = "Office 2016 / 2019 / 2021 / Microsoft 365"
"15.0" = "Office 2013"
"14.0" = "Office 2010"
"12.0" = "Office 2007"
"11.0" = "Office 2003"
"10.0" = "Office XP (2002)"
"9.0" = "Office 2000"
}
$registryPaths = @(
"HKLM:\SOFTWARE\Microsoft\Office",
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Office"
)
foreach ($path in $registryPaths) {
if (Test-Path $path) {
$versions = Get-ChildItem $path -ErrorAction SilentlyContinue |
Where-Object { $_.PSChildName -match "^\d+\.\d+$" }
foreach ($ver in $versions) {
$majorVersion = $ver.PSChildName
$productName = $officeVersions[$majorVersion]
if (-not $productName) { $productName = "Version inconnue" }
# Chercher le numéro de build précis
$wordPath = Join-Path $ver.PSPath "Word\InstallRoot"
$excelPath = Join-Path $ver.PSPath "Excel\InstallRoot"
$installPath = $null
if (Test-Path $wordPath) {
$installPath = (Get-ItemProperty $wordPath -ErrorAction SilentlyContinue).Path
} elseif (Test-Path $excelPath) {
$installPath = (Get-ItemProperty $excelPath -ErrorAction SilentlyContinue).Path
}
Write-Host "Version détectée : $majorVersion ($productName)" -ForegroundColor Cyan
if ($installPath) {
Write-Host "Chemin d'installation : $installPath" -ForegroundColor Gray
}
}
}
}
}
Get-OfficeVersion
</code></pre>
<h3><a name="p-34554-dtection-via-les-excutables-office-6" class="anchor" href="#p-34554-dtection-via-les-excutables-office-6" aria-label="Heading link"></a>Détection via les exécutables Office</h3>
<pre data-code-wrap="powershell"><code class="lang-powershell"># Méthode alternative : lire la version depuis les binaires Office
$officePaths = @(
"${env😛rogramFiles}\Microsoft Office\root\Office16\WINWORD.EXE",
"${env😛rogramFiles}\Microsoft Office\Office16\WINWORD.EXE",
"${env😛rogramFiles(x86)}\Microsoft Office\root\Office16\WINWORD.EXE",
"${env😛rogramFiles(x86)}\Microsoft Office\Office16\WINWORD.EXE",
"${env😛rogramFiles}\Microsoft Office\Office15\WINWORD.EXE",
"${env😛rogramFiles(x86)}\Microsoft Office\Office15\WINWORD.EXE"
)
foreach ($path in $officePaths) {
if (Test-Path $path) {
$fileVersion = (Get-Item $path).VersionInfo
Write-Host "Fichier : $path" -ForegroundColor Cyan
Write-Host "Version fichier : $($fileVersion.FileVersion)" -ForegroundColor Green
Write-Host "Version produit : $($fileVersion.ProductVersion)" -ForegroundColor Green
Write-Host "Nom du produit : $($fileVersion.ProductName)" -ForegroundColor Green
break
}
}
</code></pre>
<h3><a name="p-34554-script-universel-de-dtection-avance-7" class="anchor" href="#p-34554-script-universel-de-dtection-avance-7" aria-label="Heading link"></a>Script universel de détection avancée</h3>
<pre data-code-wrap="powershell"><code class="lang-powershell"># Script complet pour obtenir toutes les informations Office installées
$officeInfo = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall*,
HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall* `
-ErrorAction SilentlyContinue |
Where-Object { $.DisplayName -like "Microsoft Office" -or $.DisplayName -like "Microsoft 365" } |
Select-Object DisplayName, DisplayVersion, Publisher, InstallDate, InstallLocation |
Sort-Object DisplayName -Unique
$officeInfo | Format-Table -AutoSize
Version numérique -> nom marketing
$versionMap = @{
"16.0" = "Office 2016/2019/2021/M365"
"15.0" = "Office 2013"
"14.0" = "Office 2010"
"12.0" = "Office 2007"
}
foreach ($item in $officeInfo) {
if ($item.DisplayVersion) {
$major = ($item.DisplayVersion -split ".")[0..1] -join "."
$name = $versionMap[$major]
if ($name) {
Write-Host "$($item.DisplayName) -> $name (Build: $($item.DisplayVersion))" -ForegroundColor Yellow
}
}
}
</code></pre>
<h2><a name="p-34554-mthode-3-via-la-ligne-de-commande-cmd-8" class="anchor" href="#p-34554-mthode-3-via-la-ligne-de-commande-cmd-8" aria-label="Heading link"></a>Méthode 3 : Via la ligne de commande (CMD)</h2>
<pre data-code-wrap="cmd"><code class="lang-cmd">:: Détecter Office via le registre en CMD
reg query "HKLM\SOFTWARE\Microsoft\Office" /f "ClickToRun" /s 2>nul
reg query "HKLM\SOFTWARE\Microsoft\Office\16.0\Common\InstallRoot" 2>nul
reg query "HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\16.0\Common\InstallRoot" 2>nul
:: Vérifier la version via WMIC
wmic product where "name like 'Microsoft Office%%'" get Name, Version
:: Alternative plus rapide
wmic product where "name like 'Microsoft 365%%'" get Name, Version
</code></pre>
<h2><a name="p-34554-mthode-4-distinguer-office-click-to-run-vs-msi-9" class="anchor" href="#p-34554-mthode-4-distinguer-office-click-to-run-vs-msi-9" aria-label="Heading link"></a>Méthode 4 : Distinguer Office Click-to-Run vs MSI</h2>
<p>Depuis Office 2013, Microsoft propose deux modes d’installation : <strong>Click-to-Run (C2R)</strong> et <strong>MSI</strong> (Windows Installer traditionnel). Les identifier est important car ils se gèrent différemment.</p>
<pre data-code-wrap="powershell"><code class="lang-powershell"># Détecter le type d'installation
$c2rPath = "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun"
$c2rPath32 = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun"
if (Test-Path $c2rPath) {
$c2rProps = Get-ItemProperty $c2rPath -ErrorAction SilentlyContinue
Write-Host "Type : Click-to-Run (C2R)" -ForegroundColor Cyan
Write-Host "Version : $($c2rProps.PackageVersion)" -ForegroundColor Green
Write-Host "Canal de mise à jour : $($c2rProps.CDNBaseUrl)" -ForegroundColor Green
} elseif (Test-Path $c2rPath32) {
$c2rProps = Get-ItemProperty $c2rPath32 -ErrorAction SilentlyContinue
Write-Host "Type : Click-to-Run (C2R) 32 bits" -ForegroundColor Cyan
Write-Host "Version : $($c2rProps.PackageVersion)" -ForegroundColor Green
} else {
Write-Host "Type : Installation MSI traditionnelle" -ForegroundColor Yellow
}
</code></pre>
<h2><a name="p-34554-mthode-5-via-wmi-pour-les-scripts-dinventaire-en-entreprise-10" class="anchor" href="#p-34554-mthode-5-via-wmi-pour-les-scripts-dinventaire-en-entreprise-10" aria-label="Heading link"></a>Méthode 5 : Via WMI (pour les scripts d’inventaire en entreprise)</h2>
<pre data-code-wrap="powershell"><code class="lang-powershell"># Méthode WMI/CIM - idéale pour les requêtes à distance
$officeProducts = Get-CimInstance -ClassName Win32_Product |
Where-Object { $.Name -like "Microsoft Office" -or $.Name -like "Microsoft 365" } |
Select-Object Name, Version, Vendor, InstallDate, InstallLocation
$officeProducts | Format-Table -AutoSize
Requête sur un ordinateur distant
$remoteComputer = "NOM_ORDINATEUR_DISTANT"
$remoteOffice = Get-CimInstance -ClassName Win32_Product -ComputerName $remoteComputer |
Where-Object { $_.Name -like "Microsoft Office" }
$remoteOffice | Select-Object Name, Version | Format-Table
</code></pre>
<h2><a name="p-34554-correspondance-des-numros-de-version-office-11" class="anchor" href="#p-34554-correspondance-des-numros-de-version-office-11" aria-label="Heading link"></a>Correspondance des numéros de version Office</h2>
<div class="md-table">
<table>
<thead>
<tr>
<th>Version marketing</th>
<th>Numéro de version</th>
<th>Build exemple</th>
</tr>
</thead>
<tbody>
<tr>
<td>Microsoft 365 (continu)</td>
<td>16.0.x</td>
<td>16.0.17726.20160</td>
</tr>
<tr>
<td>Office 2021</td>
<td>16.0.x</td>
<td>16.0.14332.x</td>
</tr>
<tr>
<td>Office 2019</td>
<td>16.0.x</td>
<td>16.0.10396.x</td>
</tr>
<tr>
<td>Office 2016</td>
<td>16.0.x</td>
<td>16.0.4266.x à 16.0.5422.x</td>
</tr>
<tr>
<td>Office 2013</td>
<td>15.0.x</td>
<td>15.0.4420.x</td>
</tr>
<tr>
<td>Office 2010</td>
<td>14.0.x</td>
<td>14.0.4760.x</td>
</tr>
<tr>
<td>Office 2007</td>
<td>12.0.x</td>
<td>12.0.4518.x</td>
</tr>
</tbody>
</table>
</div><blockquote>
<p><strong>Note importante</strong> : Office 2016, 2019, 2021 et Microsoft 365 partagent tous la version principale <strong>16.0</strong>. Pour les distinguer, il faut examiner le numéro de build complet ou la présence de la clé de registre C2R.</p>
</blockquote>
<h2><a name="p-34554-mthode-6-dploiement-grande-chelle-avec-le-script-de-diagnostic-office-sara-12" class="anchor" href="#p-34554-mthode-6-dploiement-grande-chelle-avec-le-script-de-diagnostic-office-sara-12" aria-label="Heading link"></a>Méthode 6 : Déploiement à grande échelle avec le Script de diagnostic Office (SaRA)</h2>
<p>Pour les environnements d’entreprise, Microsoft met à disposition le <strong>Support and Recovery Assistant (SaRA)</strong> ainsi que des scripts de diagnostic :</p>
<pre data-code-wrap="powershell"><code class="lang-powershell"># Utiliser l'outil ODT pour inventorier Office en entreprise
Télécharger l'outil de déploiement Office (ODT) depuis Microsoft
Créer un rapport d'inventaire Office pour tout le parc
$computers = Get-ADComputer -Filter * -Properties Name | Select-Object -ExpandProperty Name
$results = foreach ($computer in $computers) {
if (Test-Connection -ComputerName $computer -Count 1 -Quiet) {
$office = Get-CimInstance -ClassName Win32_Product -ComputerName $computer -ErrorAction SilentlyContinue |
Where-Object { $_.Name -like "Microsoft Office" } |
Select-Object -First 1
[PSCustomObject]@{
ComputerName = $computer
OfficeProduct = $office.Name
Version = $office.Version
Status = "Accessible"
}
} else {
[PSCustomObject]@{
ComputerName = $computer
OfficeProduct = "N/A"
Version = "N/A"
Status = "Inaccessible"
}
}
}
$results | Export-Csv "C:\inventaire_office.csv" -NoTypeInformation -Encoding UTF8
Write-Host "Rapport exporté dans C:\inventaire_office.csv" -ForegroundColor Green
</code></pre>
<h2><a name="p-34554-rsum-des-mthodes-selon-le-cas-dusage-13" class="anchor" href="#p-34554-rsum-des-mthodes-selon-le-cas-dusage-13" aria-label="Heading link"></a>Résumé des méthodes selon le cas d’usage</h2>
<div class="md-table">
<table>
<thead>
<tr>
<th>Cas d’usage</th>
<th>Méthode recommandée</th>
<th>Complexité</th>
</tr>
</thead>
<tbody>
<tr>
<td>Vérification rapide sur un poste</td>
<td>Interface Office (Fichier > Compte)</td>
<td>Très facile</td>
</tr>
<tr>
<td>Script de détection local</td>
<td>PowerShell + registre</td>
<td>Facile</td>
</tr>
<tr>
<td>Inventaire de parc</td>
<td>PowerShell + WMI/CIM distant</td>
<td>Intermédiaire</td>
</tr>
<tr>
<td>Différencier C2R vs MSI</td>
<td>PowerShell registre ClickToRun</td>
<td>Intermédiaire</td>
</tr>
<tr>
<td>Déploiement/scripts automatisés</td>
<td>WMI + numéros de build</td>
<td>Avancé</td>
</tr>
</tbody>
</table>
</div><h2><a name="p-34554-conclusion-14" class="anchor" href="#p-34554-conclusion-14" aria-label="Heading link"></a>Conclusion</h2>
<p>La méthode la plus fiable et la plus complète pour détecter la version d’Office est <strong>l’interrogation du registre Windows via PowerShell</strong>, combinée à la lecture du numéro de build des exécutables. Pour un usage en entreprise sur plusieurs postes, le script WMI avec export CSV permet de constituer un inventaire complet de votre parc Office rapidement.</p>
<p>N’hésitez pas à préciser votre contexte (un seul poste, déploiement en entreprise, scripting automatisé, besoin de distinguer entre Office 2019 et M365) pour que je vous fournisse un script encore plus adapté à votre situation.</p>