Object Reference : Object View and Procedure Reference : Text
  
 
save
Save text object to disk as an ASCII text, RTF, HTML, PDF, TEX, or MD file.
Syntax
text_name.save(options) [path\]file_name
Follow the keyword with a name for the file. file_name may include the file type extension, or the file type may be specified using the “t=” option.
If an explicit path is not specified, the file will be stored in the default directory, as set in the File Locations global options.
The MD (Markdown) setting uses very basic syntax and should be usable in most editors.
Options
 
t=file_type (default= “txt”)
Specifies the file type, where file_type may be one of: “rtf” (Rich-text format), “txt” (ASCII text), or “html” (HTML - Hypertext Markup Language), “pdf” (Portable Document Format, PDF), “tex” (LaTeX), or “md” (Markdown).
Files will be saved with the “.rtf”, “.txt”, “html”, “pdf”, “tex”, or “md” extensions, respectively.
dropempty
Removes empty lines from output (empty lines are included by default).
Examples
The command:
text1.save mytext
saves TEXT1 to an ASCII text file named “MYTEXT.TXT” in the default directory.
text1.save mytext.bat
saves TEXT1 to an ASCII text file using the explicitly provided name “MYTEXT.BAT”.
text1.save(t=rtf, dropempty) mytext
saves TEXT1 (excluding any empty lines) to the RTF file “MYTEXT.RTF”.
Cross-references
See “Table and Text Objects” for a discussion of tables.