klyn.io.docx.DocxDocument.DocxDocument
constructor
public DocxDocument(filename as String)
Description

Opens a Word document (.docx) from a filename string.

Parameters
ParameterDescription
filenamePath to the .docx file.
Throws
  • IOException If reading the file fails.
  • DocxException If the file is not a valid OpenXML Word document.
Example
try doc = DocxDocument("spec.docx"):
    print(doc.getText())