Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Protect against macro viruses
 

For the best protection against macro viruses, you should purchase and install specialized antivirus software.

You can also use the following methods in Microsoft Word:

ShowSet the macro security level

  1. On the Tools menu, click Options.
  2. Click the Security tab.
  3. Under Macro Security, click Macro Security.
  4. Click the Security Level tab, and then select the security level you want to use.

ShowWarn about installed templates and add-ins that contain macros

Depending on your 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.) security setting, when you open a macro, you will receive a warning and the macro may be disabled for installed templates (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.) and add-ins (add-in: A supplemental program that adds custom commands or custom features to Microsoft Office.) (including wizards).

  1. On the Tools menu, click Options, and then click the Security tab.
  2. Under Macro Security, click Macro Security.
  3. Click the Trusted Publishers tab.
  4. Clear the Trust all installed add-ins and templates check box.

Note  All templates, add-ins, and macros shipped with Microsoft Office 2003 are digitally signed by Microsoft. After you add Microsoft to your list of trusted sources for one of these installed files, all subsequent interaction with these files will not generate messages.

ShowDigitally sign macros

You digitally sign (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.) a file or a macro project (macro project: A collection of components, including forms, code, and class modules, that make up a macro. Macro projects created in Microsoft Visual Basic for Applications can be included in add-ins and in most Microsoft Office programs.) by using a digital certificate (digital certificate: Attachment for a file, macro project, or e-mail message that vouches for authenticity, provides secure encryption, or supplies a verifiable signature. To digitally sign macro projects, you must install a digital certification.).

  1. If you don't already have a digital certificate, you must obtain one.

    ShowHow?

    You can obtain a digital certificate from a commercial certification authority, such as VeriSign, Inc., or from your internal security administrator or Information Technology (IT) professional. Or, you can create a digital signature yourself using the Selfcert.exe tool.

    To learn more about certification authorities that offer services for Microsoft products, see the Microsoft Security Advisor Web site.

    Note  Because a digital certificate you create yourself isn't issued by a formal certification authority, macro projects signed by using such a certificate are referred to as self-signed projects. Depending on how Microsoft Office digital-signature features are being used in your organization, you might be prevented from using such a certificate, and other users might not be able to run self-signed macros for security reasons.

  2. Open the file that contains the macro project you want to sign.
  3. On the Tools menu, point to Macro, and then click Visual Basic Editor.
  4. In the Project Explorer, select the project you want to sign.
  5. On the Tools menu, click Digital Signature.
  6. Do one of the following:
    • If you haven't previously selected a digital certificate or want to use another one, click Choose, select the certificate, and then click OK twice.
    • To use the current certificate, click OK.

ShowTips

© 2009 Microsoft Corporation. All rights reserved.