I am trying to copy the text of one WPRichText component into another using the following code:
var
TempPar: TParagraph;
...
with WPRichText1 do
begin
TempPar := DBWPRTBlock.FirstPar;
while ActiveText.AppendParCopy(TempPar, []) <> nil do ;
end;
This does copy in the paragraph, but it appends to the end of WPRichText1 instead of inserting into the current position I have set. What I want is to have my first WPRichText which could be like:
This is a sentence.
{B001}
This is the rest of the document.
The block {B001} would be loaded from another wprichtext component and copied in. Thus, if the B001 text was
Some Name
Some Address
The result would be:
This is sentence.
Some Name
Some Address
This is the rest of the document.
I don't seem to get this with the AppendParCopy. Is there a way to set the position before the copy is done? or should I use a different function?