Hi!
I'm trying to replace all red-coloured-text in my document and using this code:
ReHelpText.Finder.Clear;
ReHelpText.Finder.ToStart;
ReHelpText.Finder.CharAttr.SetColor(clRed);
ReHelpText.Finder.WholeWord:=true;
ReHelpText.Finder.WildCard:='*';
while ReHelpText.Finder.Next('*') do
begin
ReHelpText.Finder.FoundText:='Test';
ReHelpText.Finder.FoundAttr.SetColor(clBlack);
end;
It doesn't work. The finder always goes to the end of the text an inserts the word 'Test'. What am I doing wrong?
#1
♥ 0