CCS_Printing Posted June 15, 2011 Share Posted June 15, 2011 I was wondering if when the user types into a field a certain word or sentence, is there any way to make a rule that recognizes that phrase to change it to a certain font color. For example here is the sentence: Choices Matter. That's why at The Legacy Group we offer a wide range of mortgage options to best suit our clients clients individual needs. They would like there company name to come up that color, but give the user the option to type in there own sentence as well. I hope this makes sense, thanks in advance Link to comment Share on other sites More sharing options...
Dan Korn Posted June 15, 2011 Share Posted June 15, 2011 Sure, something like this: return ReplaceSubstring(TaggedTextFromRaw(Field("Blurb")), "The Legacy Group", '<color name="Red">The Legacy Group</color>'); Make sure to check "Treat returned strings as tagged text." Link to comment Share on other sites More sharing options...
CCS_Printing Posted June 15, 2011 Author Share Posted June 15, 2011 Thanks Dan, I also need it to be small caps. I tried this, but it won't capitalize "the" in The Legacy Group, I'm not sure why. return '<smallcap>'+ReplaceSubstring(TaggedTextFromRaw(Field("ParHeader")), "The Legacy Group", '<color name="PANTONE 8641 C">The Legacy Group</color>')+'</smallcap>'; Link to comment Share on other sites More sharing options...
CCS_Printing Posted June 16, 2011 Author Share Posted June 16, 2011 Does anyone know how to make this string smallcaps as well? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.