Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 717

Macro Virus

Reviewed byCybersecurity entrepreneur & security researcher

What is Macro Virus?

Macro VirusA virus written in the macro language of an office application that runs when an infected document is opened and macros are enabled.


Macro viruses are written in scripting languages such as Visual Basic for Applications (VBA) and embedded in Office documents (Word, Excel, PowerPoint), email attachments, or templates. When a user opens the document and enables macros, the code executes with the privileges of the user and can drop additional malware, exfiltrate data, or pivot to other systems. Although Microsoft has tightened defaults — disabling macros from the internet and warning on documents marked with Mark of the Web — macro-based phishing remains common in initial-access campaigns. Defences include blocking macros from external sources, signed macro policies, attack surface reduction rules, and user training on suspicious attachments.

Examples

  1. 01

    The 1999 Melissa virus spreading via infected Word documents.

  2. 02

    Modern phishing campaigns delivering Emotet or Qakbot through malicious Excel macros.

Frequently asked questions

What is Macro Virus?

A virus written in the macro language of an office application that runs when an infected document is opened and macros are enabled. It belongs to the Malware category of cybersecurity.

What does Macro Virus mean?

A virus written in the macro language of an office application that runs when an infected document is opened and macros are enabled.

How do you defend against Macro Virus?

Defences for Macro Virus typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for Macro Virus?

Common alternative names include: Office macro malware, VBA virus.

Related terms