December 12, 200619 yr Hi everyone, I am trying to highlight certain words in a text field. The idea is that the user will type a word into a global field and that word will be highlighted in the text. I am trying to make the word capitalized, bold and change colors. This is the script I have. Case( PatternCount(Lower(Contents);Lower(xFind)); Substitute(Lower(Contents);Lower(xFind); TextStyleAdd(TextColor(Upper(xFind);RGB(128 ; 0 ; 128));Bold));Contents) I am using the lower function so the user doesn't have to know if the word is upper lower or proper, they can enter "word" and it will find "word" "WORD" or "Word". The problem is, that although it will find all the words regardless of case, it capitalizes the found word but makes all the rest of the text lower case. If I take out the lower function then if the user types in "word" it will only find "word" not "WORD" or "Word". So how can I change my calc so only the searched word is affected? Any help would be greatly appreciated, I am running out of hair from pulling it out. Thanks Mike
December 12, 200619 yr Take your pick: http://www.briandunning.com/cf/13 http://www.briandunning.com/cf/578 http://www.briandunning.com/cf/579
December 13, 200619 yr Author Thanks comment. Those really helped. One question though. Is there a way to only get a full word? All of those found a string of text even if it was not the whole word. For example if I typed in "not" it would hilite every occurance regardless of case (yea!) but it also hilited the "not" in nothing, note knot or notorious. anyway to limit it to just the whole word? Hope I am not being too picky. Thanks again Mike
Create an account or sign in to comment