Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.dom.Document.moveToNextHole

Package: mlreportgen.dom

Move document append point to next template hole

Syntax

holeID = moveToNextHole(docObj)

Description

example

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.

Examples

collapse all

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

moveToNextHole(myReport);

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

Tips

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

Was this topic helpful?