MailMergeAndSaveAsCommand.execute(fileInfo) Method
Executes the MailMergeAndSaveAsCommand command by applying the specified settings.
May result in taking no action if the command’s state does not allow command execution. Use the object’s getState method to check the command state.
Declaration
execute(
fileInfo: RichEditFileInfo | string,
settings?: MailMergeSettings
): boolean
Parameters
Name | Type | Description |
---|---|---|
fileInfo | RichEditFileInfo | string | A RichEditFileInfo object specifying a file to save to. |
settings | MailMergeSettings | A MailMergeSettings object specifying the mail merge settings. |
Returns
Type | Description |
---|---|
boolean | A Boolean value identifying whether method execution was successful or failed. |
Remarks
The execute method checks the command state (obtained using the getState method) before executing, and decides whether the action can be performed.
Usage example:
var fileInfo = {
fileName: 'result',
documentFormat: ASPx.DocumentFormat.Doc,
folderPath: ''
};
var mergeSettings = {
range: ASPx.MailMergeExportRange.Range,
exportFrom: 2,
exportRecordsCount: 5,
mergeMode: ASPx.MergeMode.NewSection
};
richEdit.commands.mailMergeAndSaveAs.execute(fileInfo, mergeSettings);
See Also