fr-FR office user

Turn off Trusted Documents for VBA macros

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 allows you to turn off the Trusted Documents feature for documents containing VBA macros. If you enable this policy setting, users will always see security notifications for VBA macros in documents. When users click "Enable Content" for VBA macros, Office will not create a trust record for the document, ensuring that the user is prompted every time they open the document. If you disable or don't configure this policy setting, the Trusted Documents feature allows users to always allow VBA macros in a document so that the user is not prompted the next time they open that document. Trusted documents are exempt from security notifications. Note: Enabling this policy setting does not clear existing trusted documents that were previously trusted.

Registre

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

Nom de valeur : blockvbamacrotrusteddocument

Activé : blockvbamacrotrusteddocument = 1

Désactivé : blockvbamacrotrusteddocument = 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: Turn off Trusted Documents for VBA macros
; State: Enabled
; Supported on: Au moins Windows Server 2016, Windows 10

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

PowerShell

# Exported from gporais.com
# Policy: Turn off Trusted Documents for VBA macros
# 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 'blockvbamacrotrusteddocument' -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