Quick answer
- A DOCM file is an XML-based Microsoft Word document that can contain VBA macros, with embedded VBA functionality lost when it is converted to DOCX.
- Open the DOCM file in Microsoft Word 2007 or Word 2010, 2013, 2016, 2019, or 2021. Microsoft 365 normally does not run embedded active content automatically unless the document is trusted or opened from a trusted location. Before enabling it, make sure you understand what the macro does. Macros are generally unnecessary for viewing the document or making simple edits.
- Treat DOCM files with high caution because embedded VBA macros are active content capable of carrying macro viruses. Microsoft advises against enabling content unless you know what it does, even when the apparent sender is trusted. A .docm extension alone does not prove that a particular file is malicious, and IANA lists no DOCM-specific magic number for independent identification.
DOCM File: How to Open, Check, and Convert It
DOCM is Microsoft Word's macro-enabled document format and uses the .docm extension. It has the same basic XML structure as a modern Word document but can also contain VBA code. Internally, it is an Open Packaging Conventions ZIP package whose parts may hold XML, binary data, images, and other content. When Word saves a macro, it adds a binary vbaProject part containing the macro project's internal representation. Its registered media type is application/vnd.ms-word.document.macroEnabled.12, and IANA records no format-specific magic number.
To convert DOCM to the non-macro-enabled DOCX format, remove the macros and the binary vbaProject part, then save the document as DOCX. The document can retain ordinary Word content, but its embedded VBA functionality is lost. Keep the original DOCM if that macro behavior may still be needed.
Open a file
Open the DOCM file in Microsoft Word 2007 or Word 2010, 2013, 2016, 2019, or 2021. Microsoft 365 normally does not run embedded active content automatically unless the document is trusted or opened from a trusted location. Before enabling it, make sure you understand what the macro does. Macros are generally unnecessary for viewing the document or making simple edits.
Open the DOCM file in Microsoft Word 2007 or Word 2010, 2013, 2016, 2019, or 2021. Microsoft 365 normally does not run embedded active content automatically unless the document is trusted or opened from a trusted location. Before enabling it, make sure you understand what the macro does. Macros are generally unnecessary for viewing the document or making simple edits.
To convert DOCM to the non-macro-enabled DOCX format, remove the macros and the binary vbaProject part, then save the document as DOCX. The document can retain ordinary Word content, but its embedded VBA functionality is lost. Keep the original DOCM if that macro behavior may still be needed.
File safety
Treat DOCM files with high caution because embedded VBA macros are active content capable of carrying macro viruses. Microsoft advises against enabling content unless you know what it does, even when the apparent sender is trusted. A .docm extension alone does not prove that a particular file is malicious, and IANA lists no DOCM-specific magic number for independent identification.
Do not open the file when its source, double extension, or actual contents do not match what you expected.
Converters
To convert DOCM to the non-macro-enabled DOCX format, remove the macros and the binary vbaProject part, then save the document as DOCX. The document can retain ordinary Word content, but its embedded VBA functionality is lost. Keep the original DOCM if that macro behavior may still be needed.
Work from a copy, then compare image quality, metadata, and layout after conversion.
Frequently asked questions
What is a DOCM file and what does it contain?
A DOCM file is an XML-based Microsoft Word document that can contain VBA macros. Its package may include XML, binary data, images, other content, and a binary vbaProject part containing a saved macro project's internal representation.
Can I open a DOCM file on a phone?
Microsoft's DOCM support list names Word 2007 and Word 2010 through 2021. It does not establish compatibility with phone apps, so use one of those desktop Word versions when you need a supported opening path.
Can I view a DOCM file without enabling its macros?
Yes. Macros are generally unnecessary merely to view a DOCM document or make simple edits, so active content can remain disabled.
What is the difference between a DOCM file and a DOCX file?
Both use the basic modern Word XML format, but DOCM can store VBA macro code. DOCX is the non-macro-enabled format.
Will converting a DOCM file to DOCX remove its macros?
Yes. Conversion requires removing the macros and their vbaProject part, so embedded VBA functionality is lost.
Can a DOCM file contain a macro virus?
Yes. DOCM macros are active content capable of carrying macro viruses, although the extension alone does not establish that a particular file is malicious.
How can I assess a DOCM file before enabling its active content?
Determine what the macro does and whether you have a reason to run it before enabling active content. An apparently trusted sender is not sufficient by itself.
What MIME type and file signature identify a DOCM file?
The registered MIME type is application/vnd.ms-word.document.macroEnabled.12. IANA records no format-specific magic number for DOCM.
How do I open a DOCM file in Microsoft Word?
Use Microsoft Word 2007 or Word 2010, 2013, 2016, 2019, or 2021. Viewing and simple edits generally do not require the DOCM macros to run.
My DOCM file won't open in Word—what error checks can help me fix it?
First confirm that the filename ends in .docm and try Word 2007 or Word 2010 through 2021. A DOCM is structurally an Open Packaging Conventions ZIP package, but the extension alone cannot validate its contents. Do not enable macros as a troubleshooting step.
Related formats
Sources
Media type registration: application/vnd.ms-word.document.macroEnabled.12 · IANA
File format reference for Word, Excel, and PowerPoint · Microsoft Learn
XML file name extension reference for Office · Microsoft Learn
Office Macro-Enabled File Format [MS-OFFMACRO] · Microsoft Open Specifications
Convert a word processing document from the DOCM to the DOCX file format · Microsoft Learn
Protect yourself from macro viruses · Microsoft Support