Setting the Macro Security Level
By default, the Office 2007 applications disable document macros unless they're in a document from a trusted location. When you open a macro-enabled document outside of a trusted location, you see the Security Warning message bar, which tells you that Macros have been disabled. Clicking the Options button displays the Microsoft Office Security Options dialog box. If you want to use the document's macros, you click the Enable This Content option and then click OK.
This default behavior is reasonable and should ensure that you minimize the chances of unleashing a VBA virus on your system. However, you might want to change the default macro security level in three situations:
- You never enable macros from untrusted locations, so you can configure Office to not display the Security Warning pane.
- You digitally sign your own macros (as described in the next section), so you can configure Office to only enable macros from digitally signed VBA projects.
- The only macro-enabled documents you use are those you create yourself or those that you have scanned with an anti-virus program, so you can configure Office to allow all macros.
If any of these situations applies to you, follow these steps to change the macro security level:
- In an Office application, choose Office Application Options, where Application is the name of the program you're working with.
- Click Trust Center.
- Click Trust Center Settings to open the Trust Center dialog box.
- Click Macro Settings.
- Click to activate one of the following options:
- Disable All Macros Without Notification-Click this option to prevent the Office application from showing the Security Warning pane when you open a macro-enabled document.
- Disable All Macros With Notification-This is the default setting.
- Disable All Macros Except Digitally Signed Macros-Click this option to enable only VBA projects that have a valid digital signature.
- Enable All Macros-Click this option to enable code in any document that contains macros.
- Click OK to return to the Options dialog box.
- Click OK.
- Repeat steps 1 through 7 for any other Office applications that you use to create VBA projects.