Automation Security
Cette stratégie n'a pas de traduction française dans les modèles de l'éditeur ; le texte original est en anglais.
Explication
This policy setting controls whether macros can run in an Office 2016 application that is opened programmatically by another application.
If you enable this policy setting, you can choose from three options for controlling macro behavior in Excel, PowerPoint, and Word when the application is opened programmatically:
- Disable macros by default - All macros are disabled in the programmatically opened application.
- Macros enabled (default) - Macros can run in the programmatically opened application. This option enforces the default configuration in Excel, PowerPoint, and Word.
- User application macro security level - Macro functionality is determined by the setting in the "Macro Settings" section of the Trust Center.
If you disable or do not configure this policy setting, when a separate program is used to launch Microsoft Excel, PowerPoint, or Word programmatically, any macros can run in the programmatically opened application without being blocked.
Registre
HKEY_CURRENT_USER\software\policies\microsoft\office\common\security- Nom de la valeur
- non défini dans l'ADMX
Valeurs d'activation / désactivation : non défini dans l'ADMX (voir les options ci-dessous).
PowerShell
Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.
Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.
Activer
# Activer : office16/L_AutomationSecurity
$k = 'HKCU:\software\policies\microsoft\office\common\security'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Set the Automation Security level
# Options possibles :
# Disable macros by default = 3
# Use application macro security level = 2
# Macros enabled (default) = 1
Set-ItemProperty -Path $k -Name 'automationsecurity' -Value 1 -Type DWordDésactiver
# Désactiver : office16/L_AutomationSecurity
# Aucune valeur n'est écrite à l'état « Désactivé » (rien de défini dans l'ADMX)Revenir à « Non configuré »
# Revenir à « Non configuré » : office16/L_AutomationSecurity
$k = 'HKCU:\software\policies\microsoft\office\common\security'
Remove-ItemProperty -Path $k -Name 'automationsecurity' -ErrorAction SilentlyContinueOptions (1)
| Libellé | Contrôle | Valeur de registre | Type REG | Contraintes / détails | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Set the Automation Security levelL_SettheAutomationSecuritylevel | Liste déroulanteenum | automationsecurity | REG_DWORD | Choix par défaut (interface) : n° 2
|
Application
Microsoft 365 Apps / Office (Microsoft) — modèles de novembre 2026
Modèles officiels téléchargés le 12 novembre 2026.