設定信任的文件數目上限 的登錄值 maxtrusteddocuments (excel\security\trusted documents)使用者HKCU\software\policies\microsoft\office\16.0\excel\security\trusted documents

原則 ID
L_SetMaximumNumberOfTrustedDocuments
適用範圍
使用者設定
支援的作業系統
至少需要 Windows Server 2008 R2 或 Windows 7
來源
Microsoft 365 Apps / Office Administrative Templates (版本 5568.1000)
類別
Microsoft Excel 2016 › Excel 選項 › 安全性 › 信任中心

登錄

maxtrusteddocuments

REG_DWORD使用者
啟用時的值
取決於選項值
元素
數目上限:
值類型
REG_DWORD
最小值
0
最大值
20000
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\trusted documents]

; 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值>
"maxtrusteddocuments"=dword:<輸入值>
CMD
:: 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值>

reg add "HKCU\software\policies\microsoft\office\16.0\excel\security\trusted documents" /v "maxtrusteddocuments" /t REG_DWORD /d "<輸入值>" /f
PowerShell
# 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值>

New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security\trusted documents' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security\trusted documents' -Name 'maxtrusteddocuments' -PropertyType DWord -Value '<輸入值>' -Force | Out-Null