Hauptinhalt

mlreportgen.dom.InlineHoleContent Class

R2026b

Namespace: mlreportgen.dom

Content for an inline template hole

Since R2026b

Description

An InlineHoleContent object represents the content for an inline hole defined in a template. An inline hole occurs in a paragraph. You can append only objects that a paragraph can contain, such as text and images.

You do not create InlineHoleContent objects directly. Access them through the Holes property of a template-based DOM object such as mlreportgen.dom.Document or mlreportgen.dom.DocumentPart.

The mlreportgen.dom.InlineHoleContent class is a handle class.

Class Attributes

HandleCompatible
true
ConstructOnLoad
true

Properties

expand all

Default style name for content appended to this hole, returned as a character vector. The object assigns this style name to appended content that does not specify a style name. The template definition determines the value.

Attributes:

GetAccess
public
SetAccess
private

Data Types: char | string

Methods

expand all

Limitations

  • An inline hole can contain only inline content, such as text and images. Appending block-level content, such as a mlreportgen.dom.Paragraph or mlreportgen.dom.Table, causes a notInlineHoleCompatible error. To hold block-level content, see mlreportgen.dom.BlockHoleContent.

  • Before the write position advances past a hole, append content to that hole. After moveToNextHole advances past a hole, appending to that hole causes a holeContentCannotAppend error.

Examples

Fill Inline Holes by ID

import mlreportgen.dom.*

d = Document("myReport","docx","myTemplate");

dp = DocumentPart(d,"MySection");
dp.Holes("Title").append("Report Title");
dp.Holes("Author").append("Alice Smith");

append(d,dp);
close(d);
rptview(d);

More About

expand all

Version History

Introduced in R2026b