A macro virus is a type of computer virus (virus: A computer program or macro that "infects" computer files by inserting copies of itself into those files. When the infected file is loaded into memory, the virus can infect other files. Viruses often have harmful side effects.) that's stored in a macro (macro: An action or a set of actions you can use to automate tasks. Macros are recorded in the Visual Basic for Applications programming language.) within a file, template (template: A file or files that contain the structure and tools for shaping such elements as the style and page layout of finished files. For example, Word templates can shape a single document, and FrontPage templates can shape an entire Web site.), or add-in (add-in: A supplemental program that adds custom commands or custom features to Microsoft Office.). To help protect against macro viruses, you should purchase and install specialized antivirus software.
For more information about using antivirus software with Microsoft Office 2003, see the Microsoft Office Online Web site.
To further help reduce the risk of macro infection in Office files, set the macro security level to High or Medium and use digital signatures (digital signature: An electronic, encryption-based, secure stamp of authentication on a macro or document. This signature confirms that the macro or document originated from the signer and has not been altered.).
Security levels for macros
The levels of security to help reduce macro virus infection are as follow:
By default, the security level is set to High. If the security level is set to Medium or High, you can maintain a list of trusted macro sources. When you open a file or load an add-in that contains macros developed by any of these sources, the macros are automatically enabled.
Digital signatures
A digital signature on a macro is like a wax seal on an envelope— it confirms that the macro originated from the developer who signed it and that the macro has not been altered.
When you open a file or load an add-in that contains a digitally signed macro, the digital signature appears on your computer as a certificate. The certificate names the macro's source, plus additional information about the identity and integrity of that source. A digital signature does not necessarily guarantee the safety of a macro, so you must decide whether you trust a macro that has been digitally signed. For example, you might trust macros signed by someone you know or by a well-established company. If you are unsure about a file or add-in that contains digitally signed macros, carefully examine the certificate before enabling macros or, to be even safer, disable the macros. If you know you can always trust macros from a particular source, you can add that macro developer to the list of trusted sources when you open the file or load the add-in.
If you are a developer, you can digitally sign macros from within the Visual Basic Editor (Visual Basic Editor: An environment in which you write new and edit existing Visual Basic for Applications code and procedures. The Visual Basic Editor contains a complete debugging toolset for finding syntax, run-time, and logic problems in your code.).
List of trusted publishers
When you open a file that includes signed macros, you are prompted whether you want to trust all macros originating from that publisher. If you select this option, you add the certificate's owner to your list of trusted publishers. Before you decide to do this, you should review the details of the digital certificate— for example, look at the Issued to and Issued by fields to determine whether you trust its publisher, and look at the Valid from field to determine if the certificate is current. The certificate may also include details such as the e-mail name or Web site of the person who obtained the certificate.
Once you add a person (or corporation) to your list of trusted publishers, Office will enable macros signed by this trusted publisher without showing you a security warning. However, it is possible to remove entries from the list of trusted publishers.
Note Any certificate trusted in the list of trusted publishers will also be trusted in Internet Explorer.
Warnings about installed templates and add-ins
When you open a template or load an add-in from the Startup folder, macros within the file may be automatically enabled. However, you can clear the Trust all installed add-ins and templates security option to receive a warning about these macros. The warning will vary according to the level of security you have chosen.