DOCX (.docx, .docm)


    • Registered MIME type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
    • Microsoft Word document file.
    • Standard format of Microsoft Word 2007 and higher.
    • Also known as Office Open XML document.
    • XML-based file bundle.
    • Stores text, tables and graphics.

Import & Export

  • Import["file.docx"] imports a DOCX file as a string.
  • Import["file.docx",elements] imports the specified elements.
  • The import format can be specified with Import["file","DOCX"] or Import["file",{"DOCX",elem,}].
  • See the following reference pages for full general information:
  • Importimport from a file
    CloudImportimport from a cloud object
    ImportStringimport from a string
    ImportByteArrayimport from a byte array

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Summary"summary of the file
    "Rules"list of rules for all available elements
  • Data representation elements:
  • "Plaintext"a string giving the textual content of the whole document
    "FormattedText"a sequence of formatted text for the whole document
  • Embedded media elements:
  • "EmbeddedImageNames"a list of image file names in the bundle
    "EmbeddedImages"a list of embedded images
  • Metadata elements:
  • "CreationDate"creation date of the document, given as a DateObject
    "Creator"program that created the content
    "Description"document description
    "Language"document language
    "LastModifiedBy"author who last modified the file
    "ModificationDate"modification date of the document, given as a DateObject
    "RawMetaInformation"metadata given as strings and date objects
    "RevisionNumber"number of times the document has been saved
    "Subject"the subject of the document
    "Title"document title


open allclose all

Basic Examples  (2)

Import a DOCX file:

Import summary of a DOCX file:

Scope  (2)

Import  (2)

Import a plain test from a DOCX file:

Import some metadata:

Import Elements  (15)

Available Elements  (1)

List of available elements:

Data Representation  (2)

"Plaintext"  (1)

Import the text from the whole document:

"FormattedText"  (1)

Import formatted text from the whole document:

Embedded Media Elements  (2)

"EmbeddedImageNames"  (1)

Import the names of embedded images:

"EmbeddedImage"  (1)

Import embedded images:

Metadata  (10)

"CreationDate"  (1)

Import the creation date of the document:

"Creator"  (1)

Import the creator of the document:

"Description"  (1)

Import the description of the document:

"Language"  (1)

Import the language of the document:

"LastModifiedBy"  (1)

Import the author who last modified the file:

"ModificationDate"  (1)

Import the modification date of the document:

"RawMetaInformation"  (1)

Import metadata from the file:

"RevisionNumber"  (1)

Import the revision number:

"Subject"  (1)

Import the subject of the document:

"Title"  (1)

Import the title of the document: