.DOCM

DOCM File

Microsoft Word Macro-Enabled Document
Ask a question
QUICK ANSWER

A DOCM file is a Microsoft Word document that contains VBA macros. It opens in Microsoft Word, LibreOffice Writer, or free web tools like Word for the web and Google Docs. The main concern is safety: macros in a DOCM can carry malware, so never click "Enable Content" on a file you did not expect.

Developer: Microsoft Category: Text Files Open standard MIME: application/vnd.ms-word.document.macroEnabled.12
OPENS ON Windows macOS Linux Web
Related: .DOC · .ODT · .DOCX · .GDOC

On this page

19k+ extensions indexed
Last reviewed Jun 25, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the DOCM file format?

A .docm file is a macro-enabled document created by Microsoft Word, introduced with Microsoft Office 2007. The .docm format is closely related to the .docx format - the key difference is that it stores embedded VBA macros, which automate repetitive tasks inside the document. A plain .docx cannot carry macros, so Word automatically saves any macro-bearing document as .docm.

Like .docx, the .docm file is a compressed, ZIP archive-based Open XML package that can contain formatted text, images, shapes, charts, and more. Internally the package includes a word/vbaProject.bin binary part holding the VBA project, alongside the standard XML parts for content and styles.

Applications that can open and edit .docm files include Microsoft Word, LibreOffice Writer, and WPS Office Writer. Google Docs and Word for the web can open .docm files but do not fully execute VBA macros.

Security & safety

RISK: HIGH

DOCM is one of the most important formats to treat with caution because it can carry VBA macros that execute code. Macro-enabled Word/Excel documents are a long-standing malware delivery method (e.g. Emotet, dropper "invoice"/"resume" attachments) - the attack works by socially engineering the user into clicking "Enable Content"/"Enable Macros", after which the macro can download and run malware. Defences: (1) since 2022 Microsoft blocks macros by default in Office files that came from the internet (Mark of the Web) - do not bypass that warning for unexpected files; (2) never enable macros on a .docm you did not request, especially if a document that should be plain text arrives as macro-enabled; (3) to read suspicious content safely, open it in Google Docs / Word for the web / LibreOffice where Word VBA does not run, or save it to .docx to strip the macros; (4) keep antivirus and Office updated.

Format details

in a nutshell
FULL NAMEMicrosoft Word Macro-Enabled Documentaka Word Open XML Macro-Enabled Document, macro-enabled Word document
DEVELOPERMicrosoftsince 2007 (Word 2007 / Office Open XML)
CATEGORYText Files
MIME TYPEapplication/vnd.ms-word.document.macroEnabled.12
TYPEZIP-based Office Open XML package (zipped XML) carrying a VBA macro project
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
00010203
HEX
504B0304
ASCII
PK··
A DOCM is a ZIP archive, so it starts with "PK" (50 4B 03 04) like any ZIP and like a DOCX. It differs from DOCX only internally: the [Content_Types].xml declares the macro-enabled main-document content type and the package contains a word/vbaProject.bin part holding the VBA macros. The older binary .doc starts with D0 CF 11 E0 (OLE2).

Programs that open DOCM files

Windows3 apps
Microsoft Word Paid Double-click to open. Macros stay disabled until you choose Enable Content - only do so for trusted files.
LibreOffice Writer Open-source Free; opens the document text and (with a security prompt) StarBasic-mapped macros. Good for safely reading a suspicious .docm without running Word VBA.
WPS Office Writer Freemium Free Word-like editor; opens and edits DOCM content.
macOS2 apps
Microsoft Word Paid Double-click to open and edit; macros prompt before running.
LibreOffice Writer Open-source Free alternative; opens the document text on Mac.
Linux1 app
LibreOffice Writer Open-source Pre-installed on most distros; opens DOCM text and can re-save as DOCX/ODT/PDF.
Web2 apps
Google Docs Free Upload to Drive and open with Google Docs to read the content; macros are ignored (safe view).
Word for the web Free Upload to OneDrive and open in Word online to read/edit the text. Macros do not run in the browser, which is safe for viewing.

Technical details

deep spec
MIME typeapplication/vnd.ms-word.document.macroEnabled.12
Magic bytes50 4B 03 04 ("PK" - ZIP local file header, identical to .docx)
Container formatZIP archive (Office Open XML package)
CompressionDEFLATE, applied per-entry within the ZIP container
Main document partword/document.xml - UTF-8 WordprocessingML XML holding the document body
Macro storageword/vbaProject.bin - binary OLE2/CFBF container holding the VBA macro project (MS-OVBA format)
Content-type declaration[Content_Types].xml declares the macroEnabled.12 content type, distinguishing .docm from .docx
EncryptionOptional password encryption via AES (ECMA-376 Agile Encryption), wrapping the package in an OLE2/CFBF envelope
Typical file size20 KB - 10 MB; text-only files are small, embedded images and media dominate size
Byte orderLittle-endian in ZIP fields and the OLE2 VBA storage
Integrity checkingZIP per-entry CRC-32; optional digital signature for the VBA project and/or document package
Supported platformsWindows, macOS, Linux (LibreOffice), web (view-only in most browsers)
Relationship to .docxStructurally identical to .docx; differences are the content-type declaration and the added word/vbaProject.bin part
VBA engineMicrosoft Visual Basic for Applications (VBA); same engine used in macro-enabled Excel (.xlsm) and PowerPoint (.pptm) files
Maximum archive entriesZIP limit of 65,535 entries (rarely approached in practice)
EncodingMixed: UTF-8 XML text parts plus binary OLE2 (vbaProject.bin) within a ZIP container
Released2007 (Word 2007 / Office Open XML)
Latest versionOOXML transitional/strict per ISO/IEC 29500; current Microsoft 365 build of the schema
Open standardYes · royalty-free
Specificationlearn.microsoft.com

DOCM conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with DOCM files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about DOCM files.

Frequently asked questions

What is a DOCM file?
A macro-enabled Microsoft Word document. It is just like a DOCX but can also contain VBA macros (embedded programs). Word saves any document that uses macros as .docm so you know it can run code.
What is the difference between DOCX and DOCM?
Both are Word's ZIP/XML format. DOCX cannot contain or run macros; DOCM can. If a document has no macros it should be a .docx - getting a .docm where you expect plain text is worth a second look.
Is a DOCM file safe to open?
Opening it is fine; running its macros may not be. Never click 'Enable Content' on a .docm you did not expect - macro malware relies on that. View it in Word for the web/Google Docs/LibreOffice (no VBA runs) if unsure.
How do I remove the macros from a DOCM?
Open it in Word and Save As 'Word Document (.docx)'. Word strips the VBA project, leaving a macro-free copy with the same text and formatting.
How do I open a DOCM without Microsoft Word?
Use the free LibreOffice Writer or WPS Office (desktop), or upload it to Google Docs or Word for the web. These read the document content; the browser options also won't run any Word macros.
Why did I receive a DOCM instead of a DOCX?
Either the document genuinely uses macros (a corporate template/form), or it is a phishing attempt relying on macros. If you did not expect macros, do not enable content and verify the sender.

References

1Microsoft - [MS-DOCX] Word Extensions to the Office Open XML formatlearn.microsoft.com
2Microsoft - Macros from the internet are blocked by default in Officelearn.microsoft.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.MDMarkdown Document
5.BINCD/DVD Disc Image (BIN/CUE)
6.JPGJPEG Image
7.EXEWindows Executable (Portable Executable)
8.NOMEDIAAndroid No-Media Marker File
9.DATProgram Data File (generic)
10.RPMSGRestricted Permission Message

Related extensions

.DOCMicrosoft Word 97-2003 Document
.ODTOpenDocument Text
.DOCXMicrosoft Word Open XML Document
.GDOCGoogle Docs Shortcut (Link to a Google Docs document)
.LSTList File (generic plain-text list / listing)
.VNTvNote (mobile phone text note / memo)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z