Skip to main content

CreateFieldCommand.execute Method

Executes the CreateFieldCommand command with the specified parameter.

Declaration

execute(
    code?: string
): boolean

Parameters

Name Type Description
code string

A string value specifying the field code receiving to the created field.

Returns

Type Description
boolean

true if the command has been successfully executed; false if the command execution has failed.

Remarks

Usage example:

richEdit.commands.createField.execute("TOC \\h \\c \"Figure\"");
richEdit.commands.createField.execute("SEQ Equation \\* ARABIC");
richEdit.commands.createField.execute("TIME \\@ \"h:mm:ss\"");
See Also