Function TWPRTFDataBlock.AppendParCopy(SourcePar:TParagraph; SkipObjects:TWPTextObjTypes; AfterPar:TParagraph) : TParagraph
Unit: WPRTEDefs
Class: WPRTEDefs.TWPRTFDataBlock
Parameters
Returns
The type of the result value is TParagraph.
Description
The function AppendParCopy copies one paragraph to this data object. You can pass an object which
holds control information, such as "first created paragraph", "last created paragraph"
if you want to perform some operation with the newly created text.Example: var par : TParagraph;
par := WPRichText1.FirstPar;
while WPRichText2.ActiveText.AppendParCopy(par,[])nil do ;
WPRichText2.ReformatAll; while parnil do
begin
if par.ParagraphType=wpIsTable then
Dest.ActiveText.AppendParCopy(par)
else par := par.NextPar;
end;non par := Source.FirstPar;
while parnil do
begin
if par.ParagraphType=wpIsTable then
begin
npar := par.RowFirst;
while nparnil do
begin
// Checks if the paragraph and sub paragraphs contain any text
if npar.ContainsText then
Dest.ActiveText.AppendParCopy(npar)
else npar := npar.NextPar;
end;
par := par.NextPar;
end
else par := par.NextPar;
end;