What is DOCM? Macro-Enabled Word Document Explained
DOCM is a macro-enabled Microsoft Word document based on the Office Open XML format.
Last updated:
What is DOCM?
DOCM is a macro-enabled Microsoft Word document format introduced with Office 2007. It is built on Office Open XML, the same ZIP-and-XML packaging as DOCX, but it is allowed to contain and run embedded VBA macro code.
Microsoft split the format so that the standard DOCX extension cannot store macros, while DOCM signals that the file may contain executable VBA. This distinction is enforced through the package's content types and helps applications and users identify documents that carry automation.
How DOCM Differs from DOCX
DOCM and DOCX share the Office Open XML package structure, but a DOCM declares a macro-enabled content type and stores VBA code in a binary vbaProject.bin part inside the ZIP container.[3] The distinct extension and content type let applications and security tools recognize at a glance that a document may execute embedded automation.[1]
History and Standardization
Office Open XML was introduced with Office 2007 and standardized by Ecma as ECMA-376 in 2006, then by ISO/IEC as 29500 in 2008.[2] Splitting macro-bearing files into separate extensions (DOCM, DOTM) was a deliberate security measure, so that the default DOCX could be treated as macro-free.[1]
Security Considerations
Because VBA macros can run arbitrary code, DOCM files have long been a vector for malware, and Office applies measures such as Protected View and, more recently, blocking macros by default in files downloaded from the internet.[3] Administrators commonly restrict or digitally sign macros, and the macro project itself is stored in the legacy binary VBA format rather than XML.[2]
MKV Technical Specifications
DOCM vs Other Document Formats
| Feature | DOCM | DOCX | DOC |
|---|---|---|---|
| Structure/type | Zipped XML[2] | Zipped XML | Binary |
| Macros | Yes[1] | No | Yes |
| Editable | Yes | Yes | Yes |
| Standardized by | ECMA / ISO[3] | ECMA / ISO | Microsoft |
| Open/proprietary | Open (vendor-led)[2] | Open (vendor-led) | Proprietary |
| Best for | Macro-enabled docs | Standard docs | Legacy docs |
DOCM adds macro support to the DOCX format, which can pose security risks that the macro-free DOCX avoids.
Advantages & Disadvantages
Advantages
DOCM can store VBA macros, enabling automated form filling, document generation and repetitive editing tasks inside Word.
The distinct extension warns users and security tools that the file may contain executable code, unlike macro-free DOCX.
It uses the same modern ZIP/XML packaging as DOCX, so non-macro content remains accessible to standard tools.
Disadvantages
Because macros are executable code, DOCM files are a common malware vector and are often blocked by email gateways and Office policy.
Macros depend on Microsoft Word and VBA, so they typically do not run in other applications or on the web.
Common Use Cases
DOCM is used when a Word document needs embedded automation.
Automated templates | FileFormer
Business forms and contracts that auto-populate fields or validate input rely on embedded macros.
Repetitive document tasks | FileFormer
Macros automate formatting, mail-merge style operations and bulk text changes.
Internal tooling | FileFormer
Organizations distribute macro-enabled documents to standardize internal reporting workflows.
Convert DOCM Files Free
Use our free online document converter to convert DOCM and other formats - no signup, no watermarks.
Try Document Converter FreeFrequently Asked Questions
What is the difference between DOCX and DOCM?
Both use the Office Open XML format, but DOCX cannot store or run macros, while DOCM can contain executable VBA code. The separate extension makes macro-carrying documents easy to identify.
Are DOCM files safe to open?
DOCM files can carry malicious macros, so they should only be opened from trusted sources. Word disables macros by default and prompts before enabling them, reducing the risk.
How do I remove macros from a DOCM file?
Open the file in Word, delete the macros in the VBA editor or save it as a standard DOCX, which strips the macro content automatically and produces a macro-free document.
Can I open a DOCM without enabling macros?
Yes. Word opens DOCM documents with macros disabled by default, so you can read and edit the content while the embedded code stays inactive until you explicitly enable it.