3 4
Although the overriding purpose of macros is to streamline common tasks and procedures performed in Word and other applications, the unfortunate fact is that macros can also serve as a breeding ground for computer viruses. A macro virus is a type of computer virus that originates within a file, a template, or an add-in. As a Word user contemplating security issues, you need to be aware of macro viruses and how you can configure Word to assist you in recognizing when a macro might present a risk.
Note
One strategy you can use to combat macro viruses when working in Word is to attach digital signatures to macros to identify their origin. Then, if you trust the origin of the digital signature, you're safe to enable the macro. Keep in mind that digital signatures enable you to identify and run macros from trusted sources; they do not locate and eliminate viruses.
In addition to using digital certificates, which can provide assurance regarding the person from whom a file or macro originated (as discussed in the section "Using Digital Certificates to Digitally Sign Files and Macros."), you can specify how you want Word to react when it encounters documents that contain macros. To do this, you set Word security levels, as described next.
Tip
When Word encounters a document, it determines whether the document contains macros. If the document doesn't contain any macros, Word opens it without any warnings. If the document contains macros, Word opens it based on the current security settings. In Word, you can choose one of the following three levels of security:
By default, Word's security is set to High, and this is the recommended setting. To display Word's security options, choose Tools, Options, click the Security tab, and then click Macro Security. In the Security dialog box, click the Security Level tab, shown in Figure 34-11. You can specify any security level, but you should consider retaining Word's High security-level setting unless a particular need arises that requires you to lower your security settings.
Figure 34-11. The Security Level tab in the Security dialog box enables you to specify how Word should react when you open a document that contains macros.
When you open a file that includes signed macros (and the signer isn't included on your trusted sources list, as described in this section), you'll be asked whether you want to trust all macros from the signer. If you click Yes, the signer will be added to your list of trusted sources. Before you add a signer, you should carefully review the source's certificate. You should especially review the certificate's Issued To, Issued By, and Valid From fields. After you add a signer to your trusted sources list, Word will automatically enable macros signed by the source in the future.
If you later decide that you'd like to remove a signer from your trusted sources list, you can do so at any time, as follows:
Figure 34-12. If you've added any sources to your trusted sources list, they'll appear on the Trusted Sources tab in the Security dialog box.
Microsoft digitally signs all templates, add-ins, and macros shipped with Office XP. After you add Microsoft to your list of trusted sources for one of these installed files, all subsequent interactions with these files will not generate messages.
Tip - Add your Selfcert.exe certificate to trusted sources lists
Office XP applications will allow you to add the owner of an unauthenticated certificate (such as a Selfcert.exe certificate) to the list of trusted sources only when the certificate is used on the same computer on which it was initially created. This means that you can create a certificate using Selfcert.exe and sign your own personal macros, and you can trust that certificate on your computer. But if you attempt to share your file with other users, they won't be able to run your macros if their security is set to High.