What Is a Macro Virus?

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
On This Page

Published April 1999

Published April 1999

Computer viruses attack the software of a computer - the operating system, usually - trying to damage or destroy parts of the software. Usually, however, computer hardware is not affected. And in most cases computer applications are not affected.

With the boom in the personal computer market of the past few years, a new type of virus has emerged: a virus designed to affect your applications and your data. The macro virus, as it is known, is a virus written in the internal macro language of applications, such as Visual BasicĀ® for Applications. Over the years, these macro languages have become quite advanced, offering more and more power to the user. In many cases macro viruses cause no damage to data; but in some cases malicious macros have been written that can damage your work.

How Do Viruses Spread?

Viruses tend to spread and infect one computer after another when documents and files are shared. Most applications today allow you to attach macros or scripts to your files. When you share the file with another user, the attached macro or script goes with the file. Research has shown that most macro viruses are designed to run, or attack, when you first open the file. It doesn't matter how you open the file; if the file is opened into its related application, the macro virus is executed and does its damage. In some cases, the damage does not appear right away. And, unfortunately, by the time you realize that a macro virus has attacked you it has either spread to other documents on your computer or to other computers.

How Do You Prevent the Spread of Viruses?

You can prevent the spread of a macro virus. Here are some tips to help you from being attacked.

Know where you get a document If someone sends you a document or file, be sure you know you can trust them. Is this person someone you work with? Would this person send around files that have been sent from untrustworthy sources?

Talk to the person who created the document If you are unsure whether or not the document is safe, contact the person who created the document.

Use Office 97 macro virus protection In Office 97, the applications will tell you if a document you open contains macros. This feature allows you to either enable or disable the macros as you open the document. For more information, read "Turn On Macro Virus Protection".

Use virus scanning software to detect and remove macro viruses Virus scanning software can detect and often remove macro viruses from documents. Microsoft recommends using anti-virus software that is certified by the International Computer Security Association (ICSA). You can view a current list of ICSA-certified anti-virus products at the ICSA Web Site, http://www.icsa.net/services/consortia/anti-virus/certified_products.shtml

To learn more about viruses and computer security in general, visit the Microsoft Security Advisor Web site http://www.microsoft.com/security/default.mspx.