Slobey Posted December 12, 2006 Posted December 12, 2006 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
comment Posted December 12, 2006 Posted December 12, 2006 Take your pick: http://www.briandunning.com/cf/13 http://www.briandunning.com/cf/578 http://www.briandunning.com/cf/579
Slobey Posted December 13, 2006 Author Posted December 13, 2006 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
Recommended Posts
This topic is 6616 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now