Main Content

mlreportgen.utils.WordDoc class

Package: 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

example

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.

Input Arguments

expand all

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

Properties

expand all

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

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);

Version History

Introduced in R2018b