Reference to external Microsoft Word document
Reference to external Microsoft® Word document.
an empty document reference.
docxSubDocObj = DOCXSubDoc()
a reference to a Word document at the specified path. Appending this
reference to a Word document (the master document) inserts a link
to the subdocument at the point at which the reference is appended.
docxSubDocObj = DOCXSubDoc(
Opening a master document in Word causes the link to the subdocument to be displayed, instead of its content. To replace the link with the content, select Expand Subdocuments from the Outlining tab of the View tab on the Word toolstrip.
rptview command expands subdocuments
when it opens a Word document. You can also use
expand and unlink subdocuments.
path— Path of document targeted by this reference
Path of document targeted by this reference, specified as a character vector.
docxSubDocObj— Reference to external Word document
Path of Word document targeted by this reference, represented
Target— Path of document targeted by this reference
Path of document targeted by this reference, specified as a character vector. Use ASCII characters. Use the following format for specifying a full path involving a mapped drive.
Clone this Word document reference.
import mlreportgen.dom.* info = Document('CompanyInfo','docx'); append(info,'XYZ, Inc., makes widgets.'); close(info); infoPath = info.OutputPath; rpt = Document('Report','docx'); open(rpt); append(rpt,Paragraph('About XYZ, Inc.')); append(rpt,DOCXSubDoc(infoPath)); close(rpt); rptview(rpt.OutputPath);