WPTools Manual



Search


(press enter to search)

Function TWPCustomRtfEdit.ConvertTableToText(poConversionMode:TWPConversionMode; psOther:string; aTable:TParagraph) : Boolean

Unit: WPCTRMemo
Class: WPCTRMemo.TWPCustomRtfEdit

Parameters

Returns

The type of the result value is Boolean.

Description

Convert a certain table into standard text - UNDO is supported.
If no table was specified the current table will, be converted. If as cell separators wpconTabsMultiline or wpconTabs was selcted also tabulators will be created.
wpconTabsMultiline, the default, creates multiple lines for cells with multiple paragraphs. The contents will be correctly placed aligned at a certain horizontal position.
wpconTabsMultilineEx, will also handle soft line breaks. It requires the text to be formatted.
// Convert all tables in the document var par, npar : TParagraph; begin
par := WPRichText1.FirstPar.LastSibling; while par<>nil do begin npar := par.PrevPar; if par.ParagraphType=wpIsTable then WPRichText1.ConvertTableToText(wpconTabsMultilineEx, '', par); par := npar; end; WPRichText1.DelayedReformat;