TCustomRichView.SaveDocX

<< Click to display table of contents >>

TCustomRichView.SaveDocX

Exports TRichView document (or the selected part, if SelectionOnly=True) to the file FileName as DocX (Microsoft Word format).

function SaveDocX(const FileName: TRVUnicodeString;

  SelectionOnly: Boolean):Boolean;

(introduced in version 15; changed in version 18)

This method is available for Delphi 5+, C++Builder 2006+

The method uses rvrtfSaveDocParameters and rvrtfSaveHeaderFooter options from 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 DocX code for certain items using OnSaveItemToFile event;

insert OOXML codes in text;

insert additional code in DocX in OnSaveDocXExtra event.

 

Return value: "successful saving?"

 

See also methods:

SaveDocXToStream;

LoadDocX

See also properties:

RTFOptions;

UseStyleTemplates.

See also events:

OnWriteHyperlink;

OnWriteObjectProperties;

OnSaveComponentToFile;

OnSaveDocXExtra;

OnSaveItemToFile;

OnProgress.

See also global variables and constants:

RichViewSaveHyperlinksInDocXAsFields

See also:

Saving and loading in TRichView.