MailMergeTemplate.merge Method
The merge operation of MailMergeTemplate.
Owner: MailMergeTemplate. Package: @txtextcontrol/tx-sheet-control-server. Version: 2.0.0.
Syntax
merge(data: Record<string, unknown>, options?: MailMergeOptions): Promise<MailMergeResult>
Parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
data | Record<string, unknown> | No | Application-supplied data matching the documented schema. |
options | MailMergeOptions | undefined | Yes | Supported settings for this operation; omitted settings retain documented defaults. |
Return Value
Promise<MailMergeResult>.
Examples
Pass an existing MailMergeTemplate from the owning document. Related handles and input bytes must belong to the intended document and application; the function applies the operation and inspects its result.
import type { ServerSheetControl } from '@txtextcontrol/tx-sheet-control-server';
async function applyMailMergeTemplateMerge(
mailMergeTemplate: Awaited<ReturnType<ServerSheetControl['workbook']['createMailMergeTemplate']>>,
) {
const result = await mailMergeTemplate['merge']({ Region: 120 });
console.log(result);
}
Remarks
Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.