Skip to content
Setup FoundrySetup Foundry

Documentation

Publisher Automation Security Level

This per-user policy value determines how Microsoft Publisher handles macros in publications opened programmatically by another application.

since 0.9.8.11

Purpose

Show registry keys (1)
  • HKCU\software\policies\microsoft\office\common\security\automationsecuritypublisher

This per-user policy value determines how Microsoft Publisher handles macros in publications opened programmatically by another application. It is a REG_DWORD corresponding to the automation security mode used by Publisher:

  • 1 – Low: Macros may run in files opened programmatically.
  • 2 – By UI: Macro behavior follows the Publisher Trust Center macro settings. Depending on those settings, macros can be blocked, allowed, or permitted only after a security notification.
  • 3 – High: All macros in files opened programmatically are disabled without displaying security alerts.

The setting applies to the automation scenario. It does not generally determine how Publisher handles every publication opened directly by the user.

Notes

Security

Value 1 permits macros to run when a file is opened programmatically. VBA code in a specially crafted Publisher file can therefore execute without being restricted by the macro security behavior selected in the Trust Center. This presents a particular risk when another application automatically passes files from untrusted sources to Publisher.

Value 2 inherits its protection level from the effective Publisher macro settings. Its security therefore depends on those settings and, where applicable, on trusted locations and trusted publishers.

Value 3 prevents macros from running in programmatically opened files and does not present a security prompt. It does not provide a general block against other kinds of active content or independently executed programs.

Possible side effects

With value 3, macro-based features are unavailable in publications opened programmatically. Automation solutions that depend on VBA code within a file during the open operation might work only partially or fail.

With value 2, behavior can differ between users or devices when different macro settings are in effect. Security prompts can also interrupt unattended automation workflows.

Notes

If the policy value is absent, Publisher uses the default effective Trust Center macro setting for the automation scenario.

The numeric values correspond to the Office automation constants msoAutomationSecurityLow, msoAutomationSecurityByUI, and msoAutomationSecurityForceDisable.

Microsoft documentation

Microsoft Learn: Application.AutomationSecurity property (Publisher)

Microsoft Learn: MsoAutomationSecurity enumeration (Office)

See also