InDesign2026
API 21.5.1.73
Object

DataMerge

A data merge object.

Preference DataMerge
Hierarchy

Document

DataMerge

DataMergeField

2 preference objects

DataMergePreference | Preference

Properties

NameType AccessDescription
DataMergeFields<DataMergeField> readonly A collection of data merge fields.
DataMergePreference readonly The data merge preference properties that define the layout and content of the target page.
EventListeners<EventListener> readonly A collection of event listeners.
Events<Event> readonly A collection of events.
Boolean readonly Returns true if the object specifier resolves to valid objects.
Document readonly The parent of the DataMerge (a Document).
Preferences<Preference> readonly A collection of preferences objects.
Object read/write A property that allows setting of several properties at the same time.

Methods

EventListener

Adds an event listener.

eventType String The event type.
handler File | JavaScriptFunction The event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
void

Merges records and exports to PDF.

to File The path of exported PDF file.
using? PDFExportPreset The PDF export style to use.
outputOversetReportFile? File The path to the file in which to store the overset report.
DataMerge[]

Resolves the object specifier, creating an array of object references.

void

Merges records and produces an optional overset report.

outputOversetReportFile? File The path to the file in which to store the overset report.
void

Removes the data source.

Boolean

Removes the event listener.

eventType String The registered event type.
handler File | JavaScriptFunction The registered event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
void

Specifies the file to use as the data source.

dataSourceFile File The path to the data source file.
String

Generates a string which, if executed, will return the DataMerge.

String

Retrieves the object specifier.

void

Updates the data source file with the most current data.

Object of 7

Properties elsewhere that hold a DataMerge.

Return 1

Methods that return a DataMerge.