.DOTM

DOTM File

Microsoft Word Macro-Enabled Template
Ask a question
QUICK ANSWER

A DOTM file is a Microsoft Word macro-enabled template. Double-clicking one creates a new document from it; to edit the template itself, right-click and choose Open in Word. You can view a DOTM safely in LibreOffice Writer or Google Docs without running its macros. Treat any unexpected DOTM with caution -- it carries VBA code and is a known malware delivery format.

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

On this page

19k+ extensions indexed
Last reviewed Jun 14, 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 DOTM file format?

A .dotm file is a Microsoft Word Macro-Enabled Template - the macro-carrying member of the Word Open XML template family introduced with Office 2007. It combines the template behavior of .dotx (macro-free template) with the VBA macro capability of .docm (macro-enabled document).

Like all Office Open XML files, a .dotm is a ZIP archive beginning with the standard PK signature (50 4B 03 04). It is distinguished internally by [Content_Types].xml declaring the application/vnd.ms-word.template.macroEnabled.12 content type, and by the presence of word/vbaProject.bin - an OLE2 binary stream carrying all VBA macro code. Other package parts - word/document.xml, word/styles.xml, word/settings.xml - are standard UTF-8 XML.

The defining behavior: double-clicking a .dotm file creates a new, untitled document based on the template, leaving the template itself unchanged. To edit the .dotm directly, use File > Open or right-click > Open in Word.

Since 2022, Microsoft blocks macros by default in Office files downloaded from the internet (Mark of the Web enforcement), including .dotm templates. Macros run without prompting only when the file resides in a designated Trusted Location or Trusted Templates folder. .dotm files are widely used in corporate environments to deploy shared styles, boilerplate text, and automation - such as document assembly or mail-merge logic - via a centrally managed template path. LibreOffice Writer offers partial VBA compatibility; complex macros may require adjustments.

Security & safety

RISK: HIGH

DOTM carries VBA macros and is a high-risk file format. Key threat: 'template injection' attacks embed a DOTM reference in a seemingly benign DOCX, which downloads and executes malicious VBA silently on opening. Direct DOTM phishing lures prompt users to 'Enable Content'. Defences: (1) since 2022 Microsoft blocks macros by default in internet-sourced Office files - do not bypass the Mark of the Web warning; (2) never click 'Enable Content' on a DOTM you did not expect or request; (3) open suspicious DOTM files in Google Docs, Word for the web, or LibreOffice - Word VBA does not run in these environments; (4) inspect the file by renaming to .zip and examining vbaProject.bin with a tool like olevba (python-oletools) before running. DOTM poses greater risk than DOCM because macros in templates can persist across sessions and auto-execute on document creation.

Format details

in a nutshell
FULL NAMEMicrosoft Word Macro-Enabled Templateaka Word Macro-Enabled Template, Word Open XML Macro-Enabled Template
DEVELOPERMicrosoft Corporationsince 2007 (Word 2007 / Office Open XML)
CATEGORYText Files
MIME TYPEapplication/vnd.ms-word.template.macroEnabled.12
TYPEZIP-based Office Open XML document template carrying a VBA macro project (zipped XML + binary)
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
00010203
HEX
504B0304
ASCII
PK··
A DOTM is a ZIP archive (OOXML package) starting with "PK" (50 4B 03 04) at offset 0, identical to DOCX, DOCM, and DOTX. It is distinguished internally by its [Content_Types].xml declaring the macro-enabled template content type (application/vnd.ms-word.template.macroEnabled.12) and the presence of word/vbaProject.bin (the VBA macro storage). The older binary .dot starts with D0 CF 11 E0 (OLE2). A DOTM combines the template behavior of DOTX with the macro capability of DOCM.

Programs that open DOTM files

Windows4 apps
Microsoft Word Paid Double-click to start a NEW document from the template. To EDIT the template itself: right-click > Open, or in Word use File > Open the .dotm directly. Macros prompt before running - only allow for trusted files.
LibreOffice Writer Open-source Free. Opens DOTM and displays the template content; VBA macros are converted to StarBasic (incomplete compatibility). Safe to open for reading - Word VBA does not execute in LibreOffice.
WPS Office Writer Freemium Opens DOTM content; limited macro support. Good for viewing text/layout of a DOTM template.
Word for the web Free Upload to OneDrive; open in Word online to view template content. Macros do not run in the browser - safe for viewing suspicious DOTM files.
macOS2 apps
Microsoft Word Paid Opens and runs DOTM templates on macOS; right-click > Open to edit the template itself.
LibreOffice Writer Open-source Free alternative; opens DOTM content on macOS without running Word VBA.
Linux1 app
LibreOffice Writer Open-source Pre-installed on most distros; opens and edits DOTM content, converts VBA to StarBasic where possible.
Web1 app
Google Docs Free Upload to Google Drive and open with Google Docs to read the template content; macros are ignored (safe viewing mode). Download as DOCX/PDF from there.

Technical details

deep spec
EncodingBinary (ZIP) containing UTF-8 XML parts and a binary OLE2 VBA storage
Magic bytes`50 4B 03 04` (`PK`) at offset 0 - standard ZIP local file header
Byte orderLittle-endian (ZIP fields and embedded OLE2 VBA storage)
ContainerZIP archive (Office Open XML package)
CompressionDEFLATE per ZIP entry
VBA project storage`word/vbaProject.bin` - OLE2/CFBF binary embedded inside the ZIP; contains all macro code and module definitions
Content type`application/vnd.ms-word.template.macroEnabled.12` (declared in `[Content_Types].xml`)
Double-click behaviorCreates a new untitled document from the template; the `.dotm` itself is not opened for editing
Encryption methodAES via ECMA-376 Agile Encryption when password-protected; wraps the ZIP package inside an OLE2 envelope
Digital signatureVBA project code signing supported; optional OOXML package-level digital signature also available
Macro securityBlocked by default since 2022 for internet-sourced files (Mark of the Web); unrestricted only from Trusted Locations
Key package parts`[Content_Types].xml`, `word/document.xml`, `word/styles.xml`, `word/settings.xml`, `word/vbaProject.bin`
Typical file size20 KB - 5 MB (simple macro template; larger with embedded images or extensive VBA modules)
Released2007 (Word 2007 / Office Open XML)
Latest versionOOXML ISO/IEC 29500 (current Microsoft 365 schema); VBA macro project per MS-OVBA
Open standardYes · royalty-free
Specificationlearn.microsoft.com

DOTM conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with DOTM 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 DOTM files.

Frequently asked questions

What is a DOTM file?
A Microsoft Word macro-enabled template - a DOTX template that also carries VBA macros. Double-clicking creates a new document from the template; macros can run automatically.
How do I open a DOTM file to view its content?
For safe viewing: use Google Docs, Word for the web, or LibreOffice (macros won't run). In Word: right-click > Open or File > Open the .dotm to edit the template itself (don't just double-click - that makes a new doc).
Is a DOTM file safe to open?
Opening is risky if macros run. View in Google Docs, Word for the web, or LibreOffice Writer where Word VBA doesn't execute. In Word, do NOT click 'Enable Content' on an unexpected DOTM.
What is the difference between DOTM and DOTX?
DOTX is a macro-free Word template (safe). DOTM is the same but can also contain VBA macros. Use DOTX unless you specifically need macros.
What is the difference between DOTM and DOCM?
Both carry VBA macros. DOTM is a TEMPLATE: double-clicking creates a new document. DOCM is a document: double-clicking opens the document itself.
How do I strip the macros from a DOTM?
Open it in Word (right-click > Open), then File > Save As 'Word Template (*.dotx)'. Word warns you about removing the VBA project. The resulting DOTX is macro-free.
How do I open a DOTM without Microsoft Office?
Use free LibreOffice Writer (desktop) or upload to Google Docs or Word for the web. All three can display the template content without running Word VBA macros.

References

1IANA - application/vnd.ms-word.template.macroEnabled.12www.iana.org
2ISO/IEC 29500 - Office Open XML File Formatswww.iso.org

Keep exploring

across the database

Top extensions this week

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

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