saveInFile

saveInFile(fileName:  String;
           selection: Integer;
           options:   Integer);

The saveInFile method of the JadeRichText class saves the contents of the receiver to a file.

The saveInFile method parameters are listed in the following table.

Parameter Description
fileName Existing file in which the contents of the control are to be saved. If you do not specify a path, JADE looks in the current directory and raises an exception if the specified file is not in the directory or if it does not exist.
selection A JadeRichText class constant value that indicates the contents saved to the file, as follows.
 
  • SaveInFile_All, which saves the entire contents of the control to the file.

 
  • SaveInFile_Selection, which saves only the selected text of the receiver to the file.

options A JadeRichText class constant value that indicates the format of the loaded text, as follows.
 
  • SaveInFile_PlainText, which is saved in plain text format.

 
  • SaveInFile_UnicodeText, which is saved as plain Unicode text.

 
  • SaveInFile_RTF, which is saved as rich text format text if the text starts with a valid RTF header sequence (for example, "{\rtf ").