fr-FR office user

Enable macro trust levels

Vérifié avec Microsoft 365/Office 5568.1000 — mis à jour le 10 juillet 2026

Microsoft 365/Office 5568.1000

Pris en charge sur : Au moins Windows Server 2016, Windows 10

Chemin dans la console GPO

Configuration utilisateur\Modèles d'administration\Microsoft Office 2016\Paramètres de sécurité

Description

This policy setting controls whether macro trust levels are enabled, which classifies VBA macros into four security levels based on file location and digital signature status. If you enable this policy setting, VBA macros will be classified into the following trust levels with corresponding user experiences: - Lowest (Most Trusted): Files signed by a trusted publisher, saved to a trusted location, or unsaved files. - User Experience: No Message Bar displayed, macros load normally. - Lower: Files opened from a connected personal or business OneDrive account, connected SharePoint location, or local OneDrive folders. - User Experience: Yellow Message Bar with Enable Content option. - Moderate: Files opened from intranet locations, or signed with an extended validation (EV) certificate but not by a trusted publisher. - User Experience: Yellow Message Bar with a Learn More option. This encourages security awareness by requiring additional steps before enabling macros. - Highest (Least Trusted): All other files. - User Experience: Red Message Bar with macros blocked. When enabled, unsaved files containing macros will display a warning dialog when users attempt to save the file to local disk, informing them that saving locally may block macro execution when the file is reopened. If you disable or don't configure this policy setting, macro trust levels are not enabled and the standard macro security behavior applies.

Registre

HKCU software\policies\microsoft\office\16.0\common\security

Nom de valeur : enablemacrotrustlevel

Activé : enablemacrotrustlevel = 1

Désactivé : enablemacrotrustlevel = 0

Générateur d'exports

BETA

Configurez l'état, la portée et les options, puis générez les sorties .reg, PowerShell, Intune et SCCM — ou ajoutez le paramètre à une collection multi-paramètres.

Ces exports écrivent le registre — ce n'est pas une GPO managée.

Fichier .reg

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Enable macro trust levels
; State: Enabled
; Supported on: Au moins Windows Server 2016, Windows 10

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\security]
"enablemacrotrustlevel"=dword:00000001
Autres formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Enable macro trust levels
# State: Enabled
# Supported on: Au moins Windows Server 2016, Windows 10
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.

$path = 'HKCU:\software\policies\microsoft\office\16.0\common\security'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'enablemacrotrustlevel' -Value 1 -Type DWord

Vous construisez une collection multi-paramètres ? Ajoutez ce paramètre et générez des exports combinés (.reg, PowerShell, GPO).

Ouvrir le Builder

Intégrer cette GPO sur votre site

Contenu à intégrer
Thème

Ajoute une ligne de script : le thème suit l’apparence de votre site et la hauteur s’ajuste au contenu. Si votre site bloque les scripts, l’intégration suit le thème du système du visiteur.

Aperçu