Description


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



function SaveDocX (const FileName: String; SelectionOnly: Boolean = False): Boolean;

 Parameter

 Description

 FileName

 The name of the output DocX file.

 SelectionOnly

 Optional parameter. If True, only selected part of the document is saved.



Example


    if Form1.RichEdit1.SaveDocX('d:\file.docx') then
        ShowMessage('File saved successfully')
    else
        ShowMessage('There was an error during the export.');