I asked a previous question about highlighting search words using a parameter search word. I was able to find the following code which works perfectly for highlighting my parameter search word as a formula ({@SEARCH1}), but I have 10 parameter search words that I've converted to formula's ({@Search1}, {@Search2}, {@Search3), etc...). How can I incorporate the other Search words into this code, so that any/all search word used will highlight?
This code does work fine using one 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
This code does work fine using one 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