What is DOCM? Macro-Enabled Word Document Explained

Learn what a DOCM file is: a macro-enabled Microsoft Word document in the Office Open XML format that can store and run VBA macros, introduced with Office 2007.

Free online file converter tool. Works in Chrome Firefox Safari Edge Opera and other modern browsers on Windows macOS Linux Android and iOS. No software installation or sign-up required. All conversions run directly in your browser, so your files never leave your device. Free to use with no account needed.

Document

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:

Year Created2007
CompressionMacro-enabled document
Primary UseWord automation

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

DeveloperMicrosoft[1]
File Extension.docm[1]
MIME Typeapplication/vnd.ms-word.document.macroEnabled.12[1]
Released2007 (Office 2007)[1]
StandardOffice Open XML (ECMA-376 / ISO/IEC 29500)[1]

DOCM vs Other Document Formats

FeatureDOCMDOCXDOC
Structure/typeZipped XML[2]Zipped XMLBinary
MacrosYes[1]NoYes
EditableYesYesYes
Standardized byECMA / ISO[3]ECMA / ISOMicrosoft
Open/proprietaryOpen (vendor-led)[2]Open (vendor-led)Proprietary
Best forMacro-enabled docsStandard docsLegacy docs

DOCM adds macro support to the DOCX format, which can pose security risks that the macro-free DOCX avoids.

Advantages & Disadvantages

Advantages

Supports automation | FileFormer

DOCM can store VBA macros, enabling automated form filling, document generation and repetitive editing tasks inside Word.

Clear macro signaling | FileFormer

The distinct extension warns users and security tools that the file may contain executable code, unlike macro-free DOCX.

Open XML based | FileFormer

It uses the same modern ZIP/XML packaging as DOCX, so non-macro content remains accessible to standard tools.

Disadvantages

Security risk | FileFormer

Because macros are executable code, DOCM files are a common malware vector and are often blocked by email gateways and Office policy.

Limited portability | FileFormer

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 Free

Frequently 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.

References

  1. Open XML Formats and file name extensions - Microsoft Support
  2. Office Open XML - Wikipedia
  3. Microsoft Office Open XML (OOXML) Document Format - Library of Congress