This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Package: mlreportgen.dom

Move document append point to next template hole


holeID = moveToNextHole(docObj)



holeID = moveToNextHole(docObj) copies to the output document any text between the current hole and the next hole in the document template. DOM creates an mlreportgen.dom.RawText object for the text. This method makes the next hole the current hole and returns the ID of that hole.


collapse all

import mlreportgen.dom.*;
myReport = Document('myDoc','docx');


Input Arguments

collapse all

Document in which to move the append point to the next hole.

Output Arguments

collapse all

The ID of the template hole that the method moves to (the new current hole).

Data Types: char


The first time you invoke the moveToNextHole method, the DOM copies to the output document all of the text up to the first hole in the template. Use Document.append methods to add content to the output document to fill the first hole. The next time you invoke moveToNextHole, the DOM copies to the output document all the text between the first and second hole in the template. Then use Document.append methods to fill in the second hole. In this way, you can successively fill all of the holes in a document.

Introduced in R2014b