Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

Plan security settings for VBA macros for Office 2013

Published: February 5, 2013

Summary Explains how VBA and VBA macros settings control the way Visual Basic for Applications (VBA) and VBA macros behave in Office 2013.

Applies to:  Office 365 ProPlus 

Audience: IT Professionals

If you want to control the way Visual Basic for Applications (VBA) and VBA macros behave, you can change Office 2013 VBA and VBA macros settings for the following applications: Access 2013, Excel 2013, PowerPoint 2013, Publisher 2013, Visio 2013, and Word 2013.

Important Important:

This article is part of the Content roadmap for Office 2013 security. Use the roadmap as a starting point for articles, downloads, posters, and videos that help you assess Office 2013 security.

Are you looking for security information about individual Office 2013 applications? You can find this information by searching for “2013 security” on Office.com.

In this article:

Plan VBA and VBA macro security settings

Office 2013 provides several settings that enable you to control the behavior of VBA and VBA macros. By configuring these settings, you can do the following:

  • Change the security warning settings for VBA macros. This includes disabling VBA macros, enabling all VBA macros, and changing the way that users are notified about VBA macros.

  • Disable VBA.

  • Change how VBA macros behave in applications that are started programmatically through Automation.

  • Change how antivirus software scans encrypted VBA macros.

For information about how to configure security settings in the Office Customization Tool (OCT) and the Office 2013 Administrative Templates, see Configure security by using OCT or Group Policy for Office 2013.

By default, VBA is enabled and trusted VBA macros are allowed to run. This includes VBA macros in documents that are saved in a trusted location, VBA macros in trusted documents, and VBA macros that meet the following criteria:

  • The macro is signed by the developer who uses a digital signature.

  • The digital signature is valid.

  • This digital signature is current (not expired).

  • The certificate associated with the digital signature was issued by a reputable certification authority (CA).

  • The developer who signed the macro is a trusted publisher.

note Note:

The default security setting for macros is different in Outlook 2013. For more information, see the Outlook 2013 security documentation.

VBA macros that aren’t trusted aren’t allowed to run until a user clicks the Message Bar and selects to enable the VBA macro.

Use Office 2013 Telemetry Dashboard to see VBA macro usage data

You can easily get some visibility into VBA macro usage in your organization by reviewing data in Office 2013 Telemetry Dashboard. There is a built-in report named “Inventory” that collects and displays unique instance data about each Office solution that is monitored. This includes whether an Office document uses VBA macros.

note Note:

You can complete tasks in all Office 2013 suites by using a mouse, keyboard shortcuts, or touch. For information about how to use keyboard shortcuts and touch with Office products and services, see Keyboard shortcuts and Office Touch Guide.

To use the following procedure you must have already deployed and configured Office Telemetry Dashboard. For information about Office Telemetry Dashboard in general, see Overview of Office Telemetry. For details about how to deploy Office Telemetry, see Deploy Telemetry Dashboard.

To view VBA macro usage in an Office 2013 Telemetry Dashboard report

  1. Open Telemetry Dashboard and connect to your telemetry database.

  2. In the navigation pane of Telemetry Dashboard, choose Custom report.

  3. When the Custom report page opens, choose Create custom report.

  4. In the PivotTable Fields list, Inventory section, find and select Has VBA. Review the report for any VBA related warnings. If you need to investigate more, select additional fields in the Inventory table.

  5. Save the data if you’d like, then close the Telemetry Dashboard.

Change the Office 2013 security warning settings for VBA macros

Office 2013 provides a setting that enables you to change the security warning settings and the behavior of VBA macros. Use the following guidelines to determine how to configure this setting if you want to change how users are notified about untrusted VBA macros or change the default behavior of VBA macros.

Group Policy setting name: VBA Macro Notification Settings

  • Description: This setting controls how applications warn users about Visual Basic for Applications (VBA) macros. You configure this setting on a per-application basis for Access 2013, Excel 2013, PowerPoint 2013, Publisher 2013, Visio 2013, and Word 2013. You can select one of four possible options for this setting:

    • Disable all with notification   The application displays the Trust Bar for all macros, whether signed or unsigned. This is the default setting.

    • Disable all except digitally signed macros   The application displays the Trust Bar for digitally signed macros. This allows users to enable them or leave them disabled. Any unsigned macros are disabled, and users aren’t notified or given the ability to enable the unsigned macros.

    • Disable all without notification   The application disables all macros, whether signed or unsigned, and doesn’t notify users.

    • Enable all macros (not recommended; potentially dangerous code can run)  All macros are enabled, whether signed or unsigned. This option can significantly reduce security by letting dangerous code to run undetected.

  • Impact:  If you enable this setting and select the Disable all except digitally signed macros option, documents and templates that contain unsigned macros lose all functionality supplied by those macros. To prevent this loss of functionality, users can put files that contain macros in a trusted location.

    Important Important:

    If Disable all except digitally signed macros is selected, users can’t open unsigned Access 2013 databases.

    If you select Disable all without notification, documents and templates that contain unsigned and signed macros lose all functionality that is supplied by those macros. This is true even if a macro is signed and the publisher is listed in the Trusted Publisher list.

  • Guidelines: Organizations that have a highly restrictive security environment typically enable this setting and select the Disable all except digitally signed macros option. Organizations that don’t let users run macros typically enable this setting and select Disable all without notification.

Disable VBA in Office 2013

Office 2013 provides a Group Policy setting that enables you to disable VBA. By default, VBA is enabled. Use the following guidelines to determine how to configure this setting if you want to disable VBA.

note Note:

You can only disable VBA by using Group Policy. There isn’t a Trust Center equivalent.

Group Policy setting name: Disable VBA for Office applications

  • Description: This setting disables VBA in Excel 2013, Outlook 2013, PowerPoint 2013, Publisher 2013, SharePoint Designer 2013, and Word 2013, and prevents any VBA code from running in these applications. You can’t configure this setting on a per-application basis. It’s a global setting. Enabling this setting doesn’t install or remove any VBA-related code from a user’s computer.

  • Impact: If you enable this setting, VBA code doesn’t run. If your organization has business-critical requirements for using documents that have VBA code, don’t enable this setting.

  • Guidelines: Organizations that have highly restrictive security environments typically enable this setting.

Change how Office 2013 VBA macros behave in applications that are started programmatically

Office 2013 provides a setting that enables you to change the way VBA macros behave in applications that are started programmatically through Automation. By default, when a separate program is used to programmatically start Excel 2013, PowerPoint 2013, or Word 2013, any macros can run in the application that was programmatically started. Use these guidelines to determine how to configure this setting if you want to do the following:

  • Prevent macros from running in applications that are programmatically started through Automation.

  • Allow VBA macros to run according to the VBA macro security settings that are configured for the applications that are programmatically started through Automation.

Group Policy setting name: Automation Security

  • Description: This setting controls whether macros can run in an application that is opened programmatically by another application. This setting is a global setting and applies to Excel 2013, PowerPoint 2013, and Word 2013. You can’t configure this setting on a per-application basis. You can choose one of three options for this setting:

    • Disable macros by default   All macros are disabled in the programmatically opened application.

    • Macros enabled (default)   Macros are allowed to run in the programmatically opened application. This option enforces the default configuration.

    • Use application macro security level   Macro functionality is determined according to how you configure the VBA macro warning settings setting for each application.

  • Impact: If you enable this setting and select the Disable macros by default option, macros won’t run in applications that are programmatically started. This can be a problem if an application is started programmatically and then opens a document or a template that contains macros. In this case, the functionality that is provided by the macros is not available. The same situation might occur if you select the Use application macro security level option and you disable macros using the VBA macro warning settings setting.

  • Guidelines: Most organizations enable this setting and select the Use application macro security level option. But, organizations that have a highly restrictive security environment typically enable this setting and select the Disable macros by default option.

Change how encrypted VBA macros are scanned for viruses in Office 2013

Office 2013 provides a setting that enables you to change the way encrypted VBA macros are scanned by antivirus software in Excel 2013, PowerPoint 2013, and Word 2013. By default, if a document, presentation, or workbook is encrypted and contains VBA macros, the VBA macros are disabled unless antivirus software is installed on the client computer. In addition, encrypted VBA macros are scanned by the client computer’s antivirus software when a user opens a document that contains encrypted macros. Use these guidelines to determine how to configure this setting if you want to do the following:

  • Allow all encrypted VBA macros to run without being scanned by antivirus software.

  • Scan encrypted VBA macros if antivirus software is installed, but enable encrypted VBA macros if no antivirus software is installed.

Group Policy setting names: Scan encrypted macros in Excel Open XML documents, Scan encrypted macros in PowerPoint Open XML documents, Scan encrypted macros in Word Open XML documents

  • Description: This setting controls the way encrypted VBA macros undergo virus scanning. This setting is a per-application setting and can be configured for Excel 2013, PowerPoint 2013, and Word 2013. You can choose one of three options for this setting:

    • Scan encrypted macros (default). All encrypted VBA macros are disabled unless they are scanned by antivirus software. This option enforces the default configuration.

    • Scan if anti-virus software available. Encrypted VBA macros are disabled unless they are scanned by antivirus software. However, if no antivirus software is installed on the client computer, all encrypted VBA macros are enabled.

    • Load macros without scanning. Encrypted VBA macros are enabled and aren’t scanned, regardless of whether antivirus software is installed on the client computer.

  • Impact: If you enable this setting and select the Load macros without scanning option, security could be significantly reduced by encrypted macros that have not been scanned for viruses. The same is true if the client computer doesn’t have antivirus software installed and you enable this setting and select the Scan if anti-virus software available option

  • Guidelines: Most organizations use the default configuration for this setting and don’t change this setting.

Related Office 2013 VBA macro settings

Two other settings affect how VBA macros behave in Office 2013 applications. If you are changing VBA macro settings because you have a special security environment, you might want to evaluate the following settings:

Group Policy setting name: Trust access to Visual Basic project

Description: This setting determines whether automation clients can access the VBA project. This setting is a per application setting and can be set individually for Excel 2013, PowerPoint 2013, and Word 2013.

Group Policy setting name: Disable all Trust Bar notifications for security issues

Description: This setting prevents users from seeing Message Bar warnings, such as warnings about unsafe VBA macros. This is a global setting that applies to Excel 2013, PowerPoint 2013, and Word 2013. You can’t configure this setting on a per-application basis.

note Note:

For the latest information about policy settings, refer to the Excel 2013 workbook Office2013GroupPolicyAndOCTSettings_Reference.xls that is included in the Office 2013 Administrative Template files. For more information, see the Office 2013 Administrative Template files (ADMX/ADML) and Office Customization Tool Technet article.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.