DOCX Compatibility: Apps, Versions and Common Limits
Understand why a valid DOCX file can behave differently across applications and devices.
Application Rendering Tiers
Reference Implementations
Microsoft Word (Microsoft 365, 2021, 2024 on Windows and macOS)
The normative implementation against the [MS-DOCX] specification. Supports the full ECMA-376 feature set including legacy compatibility mode, VML drawing objects, and OLE2 embedding. The Windows desktop build remains the only environment where every element described in the standard is guaranteed to render.
Microsoft Word for the Web
Shares core layout logic with the desktop client but operates under browser sandbox constraints. Embedded fonts are ignored unless served through the host environment. Documents containing w:altChunk references to external content fail silently because the web runtime cannot resolve arbitrary file system paths.
LibreOffice Writer (7.5 and later)
Implements DOCX import through an independent parser that maps OOXML structures to its internal document model. Layout divergence is most visible in multi-column sections containing footnotes and in nested tables where cell margin inheritance differs from the Word algorithm by 1–2 points.
Feature-Limited Readers
Google Docs
Strips unsupported structures on import without warning. Text boxes, tracked changes in headers and footers, field codes referencing document properties, and all embedded font data are discarded. On export, SmartArt and custom shapes are flattened to static images, and the original OOXML markup is permanently lost.
Apple Pages (macOS)
Routes DOCX through a translation layer that maps OOXML elements to Apple’s internal layout model. OLE objects and WMF images are dropped. Tables with merged cells spanning more than two rows may collapse to single-row structures. Complex paragraph borders with asymmetric line styles are reduced to uniform strokes.
WPS Office (Windows, Linux, mobile)
Feature coverage approaches Microsoft Word for common document elements, but OOXML math equations render with incorrect baseline alignment when mixed with inline text. Custom XML data fields within w:customXml elements are parsed but not exposed to the user interface.
Mobile and Embedded Viewers
Microsoft Word for iOS and Android
Uses a device-optimized rendering engine distinct from the desktop codebase. Margin calculations and line spacing can differ by 1–2 points on high-DPI screens. Documents with more than 500 pages may trigger memory-pressure truncation on devices with less than 4 GB of RAM.
OnlyOffice (web)
Handles standard paragraph and table formatting reliably but rejects documents containing w:customXml or w:altChunk elements. Mail-merge templates that depend on these structures produce a blank document or an error message.
Operating System Preview Handlers
macOS Preview and the Windows File Explorer preview pane do not execute field codes, resolve external image relationships, or apply paragraph-level shading. A document that appears complete in Word may show placeholder rectangles and raw field syntax in these viewers.
Feature Support by Category
Layout Structures
| Feature | Word | LibreOffice | Google Docs | Apple Pages |
|---|---|---|---|---|
Multi-level lists with numId overrides |
Full | Full | Partial — drops override levels | Partial — loses restart numbering |
| Anchored text boxes | Full | Full | Dropped on import | Converted to floating shapes |
| Unequal column widths | Full | Partial — last column resized to fill | Supported | Not supported |
| Artistic page borders | Full | Partial — bitmap fallback only | Dropped | Dropped |
Embedded Objects and Media
SmartArt
Only Microsoft Word preserves editable SmartArt. All other applications render the fallback image stored in the document’s media folder at the time of last save. Re-saving the document in a non-Word application replaces the editable SmartArt XML with a static image permanently.
Embedded Fonts
Word and LibreOffice honor w:fonts embedding. Google Docs strips all embedded font data on import. Apple Pages ignores embedded fonts and substitutes system fonts without notifying the user. A document that depends on embedded fonts for character spacing will reflow in both readers.
OLE Objects
Embedded Excel charts, Visio diagrams, and equation objects render inline only in Microsoft Word. Other applications display an icon or a blank placeholder. Mobile readers on devices with less than 2 GB of RAM may crash when opening documents containing OLE objects larger than 2 MB.
Version-Specific Breaking Changes
Word 2007 vs. Word 2013 and Later
Documents authored in Word 2007 store w:defaultTabStop in twips (twentieths of a point). Word 2013 and later store the same value in EMUs (English Metric Units). LibreOffice 7.x parses both encodings correctly, but Word for the Web misinterprets twip-based values, causing default tab stops to shift by approximately 2–3 points.
Compatibility Mode and the w:compat Element
A document saved with the "Compatibility Mode" flag set in w:compat (section 2.15.4 of [MS-DOCX]) restricts the feature set to Word 2007–2010 behavior. Opening such a document in Word 2024 disables style sets, threaded comments, and modern list indentation rules. The restriction persists until the user explicitly converts the document, which alters the w:compat settings in settings.xml.
Relationship Ordering in _rels/.rels
The Open Packaging Convention requires relationship elements in _rels/.rels to follow a specific ordering. Some third-party tools produce DOCX files where relationships appear in non-canonical order. Microsoft Word tolerates this deviation. Google Docs and OnlyOffice may reject the file entirely, displaying a generic "file is corrupt" error despite the document being structurally valid.
Observable Validation Checks
Schema Compliance
A file that fails ECMA-376 schema validation will break in every reader. Validate using the docx4j library’s CheckCompliance utility or the Open XML SDK validation classes. Schema validity does not guarantee cross-application compatibility, but schema invalidity guarantees failure.
Content Type Declarations
Open [Content_Types].xml at the root of the package and verify that every part referenced in the document body has a corresponding <Override> element. Missing overrides for image or font parts cause some readers to refuse extraction, producing blank frames where content should appear.
External Relationship Resolution
Inspect word/_rels/document.xml.rels for relationships with TargetMode="External". These references to resources outside the package are ignored by web-based and mobile readers. Hyperlinks to external URLs survive; image and data source references do not.
Field Code Inventory
Extract all w:instrText elements from document.xml. Any field code beyond MERGEFIELD, PAGE, NUMPAGES, DATE, and HYPERLINK is unlikely to render outside Microsoft Word. Documents that depend on DOCVARIABLE, QUOTE, or custom field codes will display raw syntax or blank spaces in other applications.
Hard Limits
Structural Limits per [MS-DOCX]
| Parameter | Limit |
|---|---|
| Maximum paragraph width | 22 inches (55.88 cm) |
| Maximum table columns | 63 |
| Maximum nested table depth | 15 levels |
| Maximum page count | 32,767 pages |
| Maximum file size for reliable opening | 512 MB (Word desktop); 100 MB (Word for Web) |
Practical Limits Across Applications
- Google Docs truncates documents exceeding 1 million characters or 50 MB on import.
- Apple Pages silently drops table rows beyond approximately 10,000 per table.
- LibreOffice Writer may fail to open DOCX files containing more than 65,535 bookmarks due to internal ID space exhaustion.
- Mobile Word clients throttle rendering at 500 pages; content beyond this boundary is accessible only through search and navigation panes.
Elements That Cannot Be Made Compatible
VML Drawings
The [MS-DOCX] specification (section 2.10.7) marks VML as deprecated. Word 2003–2007 used VML for vector graphics; Word 2010 and later store a DrawingML fallback. Modern readers render VML only through the fallback path. If the fallback is missing, the graphic is invisible. No reliable VML-to-DrawingML converter exists outside the Word save pipeline.
ActiveX Controls and Macros
Executable content embedded via w:activeX or w:attachedTemplate with macro references is blocked by every application except Word desktop with macros enabled. LibreOffice and Google Docs open such documents as read-only or refuse to open them entirely.
Custom XML Data Bindings
The w:dataBinding element links document content controls to external XML data sources. Only Microsoft Word and specialized enterprise SDKs process these bindings. All other readers silently discard the binding metadata, leaving content controls empty or displaying placeholder text.
Pre-Distribution Verification Procedure
- Validate schema conformance using the Open XML SDK or
docx4j. Reject any file that produces schema errors. - Open in three rendering engines: Word desktop (Windows), LibreOffice Writer (latest stable), and Google Docs. Compare pagination at page 1, page 50, and the last page. Note any image displacement or font substitution.
- Inspect
[Content_Types].xmlfor an<Override>entry matching every part name in the package. Add missing declarations before distribution. - Test in the Word for Web viewer at
onedrive.live.com. This reveals failures in font embedding, external resource resolution, andw:altChunkprocessing that will affect all web-based consumers. - Flatten non-portable features when targeting non-Word users: convert SmartArt to 300 DPI PNG, remove OLE objects, and embed fonts as TrueType outlines.
Reference: [MS-DOCX] — Word Extensions to the Office Open XML (.docx) File Format, Microsoft Open Specifications, https://learn.microsoft.com/en-us/openspecs/office_standards/ms-docx/