• Offizieller Beitrag

    Hi,

    it is better to use the 'Finder' since it has more control.

    I wrote this code which to replace the text "[sig]" with a certain image. Should be suitable example.

    Code
    WPRichText1.Finder.ToStart;
     while WPRichText1.Finder.Next('[sig]') do
     begin
           WPRichText1.CPPosition := WPRichText1.Finder.FoundPosition;
           WPRichText1.Finder.FoundText := '';
           WPRichText1.TextObjects.InsertCopy(Image1.Picture.Graphic);
     end;
     WPRichText1.DelayedReformat;

    Julian