TCustomRichView.SaveRTF

<< Click to display table of contents >>

TCustomRichView.SaveRTF

Exports TRichView document (or the selected part, if SelectionOnly=True) to the file FileName as RTF (Rich Text Format).

function SaveRTF(const FileName: TRVUnicodeString;

  SelectionOnly: Boolean):Boolean;

(introduced in version 1.3; changed in version 18)

Options for saving are in RTFOptions property.

By default, inserted controls are not saved. You can save them yourself using OnSaveComponentToFile event.

By default, items tags are saved as targets of hypertext links. You can customize saving using OnWriteHyperlink event.

You can save additional information about non-text objects in OnWriteObjectProperties event.

You can:

completely change RTF code for certain items using OnSaveItemToFile event;

insert additional code in RTF in OnSaveRTFExtra event;

insert RTF codes in text.

 

Return value: "successful saving?"

 

See also methods:

SaveRTFToStream;

CopyRTF;

LoadRTF.

See also properties:

RTFOptions;

UseStyleTemplates.

See also events:

OnWriteHyperlink;

OnWriteObjectProperties;

OnSaveComponentToFile;

OnSaveRTFExtra;

OnSaveItemToFile;

OnProgress.

See also:

Saving and loading in RichView.