Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 42 ยท Getting Started

File Formats in Microsoft Word: DOCX, DOC, PDF and More

Understand Word file formats: DOCX, DOCM, DOC, DOTX, PDF, ODT, RTF and TXT, what each is for, what is inside a .docx file, and how to choose when saving.

Every Word document is stored in a file format, identified by its extension (the letters after the dot). The format decides what is saved (formatting, images, comments), which programs can open it and how large the file gets. Choosing the right one avoids lost formatting, security warnings and unreadable attachments.

The formats you will meet

Extension Name Use it when
.docx Word Document Default. Editable, modern, compact
.docm Word Macro-Enabled Document The file contains macros (see macros)
.doc Word 97-2003 Document You must share with very old software
.dotx Word Template A reusable starting point, see templates
.dotm Macro-Enabled Template Template that carries macros
.pdf Portable Document Format Final version for reading and printing
.odt OpenDocument Text Sharing with LibreOffice or OpenOffice
.rtf Rich Text Format Basic formatting that nearly every editor reads
.txt Plain Text Text only: no fonts, images or tables
.htm / .html Web Page Rarely; output is messy
.xps XPS Document Microsoft's PDF alternative, rarely used

The x in .docx means XML-based; the m in .docm means macros. Seeing a name ending in m is your cue for caution: macros can carry malware, which is why Word blocks them by default for files from the internet.

DOCX versus DOC

The old binary .doc format was used until Word 2003. Since Word 2007 the default is Office Open XML (.docx). Benefits: smaller files, better recovery when a file is damaged, and macros kept out of ordinary documents. Opening a .doc file shows Compatibility Mode in the title bar: newer layout features are disabled so the file stays editable in old Word. Use File > Info > Convert to upgrade it.

What is inside a .docx file

A .docx file is a ZIP archive of XML files. If you rename report.docx to report.zip and open it, you find folders such as word/, _rels/ and docProps/. The main text lives in word/document.xml, styles in word/styles.xml, pictures in word/media/, headers and footers in their own files. That is why a corrupted document can often be repaired by extracting the text from the XML.

JS Stand-in: what a .docx archive contains

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Choosing a format when you save

Use File > Save As (or F12) and open the Save as type list.

  • Share to edit: .docx.
  • Share to read or print exactly as laid out: PDF. Fonts, margins and images stay the same on every device. See saving and exporting for the steps.
  • Share with LibreOffice users: .odt, though .docx usually works too.
  • Maximum compatibility, minimal formatting: .rtf or .txt.
  • Send a template: .dotx.

Saving as plain text drops everything except characters: fonts, tables, pictures and styles are lost. Word asks you to confirm first. Always keep your .docx as well.

Checking compatibility

Before sending a document to someone with an older version, run File > Info > Check for Issues > Check Compatibility. Word lists features (like some equations and new graphics) that may change or vanish. Inspect Document in the same menu finds hidden data such as comments, tracked changes, personal information and hidden text: use it before publishing.

Reading the format from the extension

JS Stand-in: describe a file from its name

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Practical advice

  • Keep file names short, descriptive and free of characters like / \ : * ? " < > |, which Windows forbids.
  • Turn on File > Options > Save > Save files in this format if you want something other than .docx by default.
  • Turn on Embed fonts in the file when you send a .docx that uses unusual fonts to people who don't have them (it increases size).
  • Documents opened from email or the web start in Protected View: click Enable Editing only if you trust the source.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is a .docx file technically?

    Office Open XML packages several XML files and media inside a ZIP container.
  2. 2. Which extension marks a document that can contain macros?

    The m stands for macro-enabled; .docx files cannot hold macros.
  3. 3. You want the recipient to see your exact layout and not edit it. Which format fits?

    PDF fixes fonts, margins and images for every reader.
  4. 4. What does Compatibility Mode in the title bar tell you?

    Compatibility Mode keeps an old-format file editable in old Word; Convert upgrades it.

Summary

  • .docx is the default; .docm carries macros; .dotx is a template; PDF is for fixed-layout reading.
  • A .docx is a ZIP of XML files, which also explains why it is small and repairable.
  • Save As (F12) lets you pick the format; plain text loses all formatting.
  • Check Compatibility and Inspect Document before sharing.

Next: Create, Open, Save and Close Documents