TCustomRichViewEdit.InsertDocXFromFileEd (D2009+)

<< Click to display table of contents >>

TCustomRichViewEdit.InsertDocXFromFileEd (D2009+)

Inserts DocX (Microsoft Word Document) from file FileName at the position of caret.

function InsertDocXFromFileEd(const FileName: TRVUnicodeString): Boolean;

(Introduced in version 19)

Parameters for loading are in TRichView.RTFReadProperties. The most important properties affecting DocX loading are RTFReadProperties.TextStyleMode and ParaStyleMode. The imported DocX may look absolutely different depending on values of these properties!  Setting for DocX loading can be changed in the TRichView component editor.

Method type: editstyle editing-style method for insertion.

If style templates are used, and RTFReadProperties.TextStyleMode=RTFReadProperties.ParaStyleMode=rvrsAddIfNeeded, and StyleTemplateInsertMode<>rvstimIgnoreSourceStyleTemplates, the method merges a DocX style sheet into Style.StyleTemplates, and reads text and paragraph styles according to StyleTemplateInsertMode. The method calls OnStyleTemplatesChange event.

Return value:

"successful reading?" (extended information is in TRichView.RTFReadProperties.DocXErrorCode)

 

See also methods of TRichViewEdit:

InsertDocXFromStreamEd.

See also methods of TRichView:

LoadDocX.

See also events of TRichView:

OnImportPicture;

OnReadHyperlink;

OnStyleTemplatesChange,

See also:

Saving and loading;

Inserting items in position of caret.