devkult_
tools30converters34
home/mime/.docm

.docm MIME type

Macro-enabled Word documentdocuments

application/vnd.ms-word.document.macroEnabled.12

Word documents that can contain VBA macros, with the same ZIP-of-XML structure as .docx.

MIME typeapplication/vnd.ms-word.document.macroEnabled.12
Extensions.docm
Content-Typeapplication/vnd.ms-word.document.macroEnabled.12
Compress in transit?No — already compressed
File signature50 4B 03 04 (PK..)
the ZIP signature — this format is a ZIP archive inside

Good to know

  • Office blocks macros in files downloaded from the internet by default, so a .docm from your site opens with its macros disabled.
  • If users upload Office files, treat macro-enabled types as higher risk — or accept only .docx.
  • Apache's stock config spells the type in lowercase (macroenabled). MIME types are case-insensitive, but a naive string comparison in an upload validator isn't.

Serve .docm files with the right type

The response header to send:

Content-Type: application/vnd.ms-word.document.macroEnabled.12

Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:

nginx (inside the types block in mime.types)
application/vnd.ms-word.document.macroEnabled.12 docm;
Apache (.htaccess or server config)
AddType application/vnd.ms-word.document.macroEnabled.12 .docm
Express
res.set("Content-Type", "application/vnd.ms-word.document.macroEnabled.12");
Python
import mimetypes

mimetypes.add_type("application/vnd.ms-word.document.macroEnabled.12", ".docm")
HTML file input
<input type="file" accept=".docm,application/vnd.ms-word.document.macroEnabled.12">

Check it

See what a server sends for a file, and what type a local file really is by its contents:

curl -sI https://example.com/file.docm | grep -i '^content-type:'
file --mime-type file.docm

Frequently asked questions

What is the MIME type for .docm files?

application/vnd.ms-word.document.macroEnabled.12.

What Content-Type header should a .docm file be served with?

Content-Type: application/vnd.ms-word.document.macroEnabled.12. It's already compressed, so servers shouldn't gzip it.

How can I tell if a file is really a .docm?

Check its bytes rather than the extension: DOCM files start with 50 4B 03 04 (PK..) — the ZIP signature — this format is a ZIP archive inside. On the command line, file --mime-type name.docm does this for you.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options