The execute method checks the command state (obtained using the getState method) before executing, and decides whether the action can be performed.
Usage example:
JavaScript |
var mergeSettings = {
range: ASPx.MailMergeExportRange.Range,
exportFrom: 2,
exportRecordsCount: 5,
mergeMode: ASPx.MergeMode.NewSection
};
richEdit.commands.createMailMergeAndDownload.execute(ASPx.DocumentFormat.Doc, mergeSettings);
|