Can anyone tell me the right way to make the following loop through multiple search words. (Ex. Search1, Search2, Search3, etc.) Right now, it will only search the text using 1 search word.
Shared StringVar SearchText := {@SEARCH1} ;
StringVar Htm1 := "<font color=#FF0066>";
StringVar Htm2 := "<b>";
StringVar Htm5 := "</b>";
StringVar Htm6 := "</font>";
StringVar Result := "";
StringVar Temp := "";
NumberVar Start := 1;
NumberVar Ln := Len(SearchText);
NumberVar Loc := Instr({@NOTES}, SearchText);
While Loc > 0 Do (
Temp := Mid({@NOTES}, Start, Loc - Start) + Htm1 & Htm2 + Mid({@NOTES}, Loc, Ln) & Htm5 & Htm6;
Result := Result + Temp;
Start := Loc + Ln;
Loc := Instr(Start, {@NOTES}, SearchText);
);
Temp := Mid({@NOTES}, Start);
Result := Result + Temp;
Result
Shared StringVar SearchText := {@SEARCH1} ;
StringVar Htm1 := "<font color=#FF0066>";
StringVar Htm2 := "<b>";
StringVar Htm5 := "</b>";
StringVar Htm6 := "</font>";
StringVar Result := "";
StringVar Temp := "";
NumberVar Start := 1;
NumberVar Ln := Len(SearchText);
NumberVar Loc := Instr({@NOTES}, SearchText);
While Loc > 0 Do (
Temp := Mid({@NOTES}, Start, Loc - Start) + Htm1 & Htm2 + Mid({@NOTES}, Loc, Ln) & Htm5 & Htm6;
Result := Result + Temp;
Start := Loc + Ln;
Loc := Instr(Start, {@NOTES}, SearchText);
);
Temp := Mid({@NOTES}, Start);
Result := Result + Temp;
Result