Main Content

mlreportgen.utils.WordDoc Class

Namespace: mlreportgen.utils

Wrap a Microsoft Word doc file

Description

This utility wraps a Word document file (.docx or .rtf) into an object. You can then manipulate the object using the methods of this utility.

The mlreportgen.utils.WordDoc class is a handle class.

Creation

Description

docobj = mlreportgen.utils.WordDoc(filename) wraps a Word document file and returns it as a Word doc object. Only one WordDoc object can exist for each Word document file.

example

Input Arguments

expand all

Path to a Word document file, specified as a character vector or string scalar.

Properties

expand all

Path to a Word document file, specified as a character vector or string scalar.

Methods

expand all

Examples

collapse all

This example creates a WordDoc object from the existing MyWordDoc.docx file.

docobj = mlreportgen.utils.WordDoc("MyWordDoc.docx");
netobj(docobj);

Limitations

  • mlreportgen.utils.WordDoc is not supported in a MATLAB® web app.

Version History

Introduced in R2018b