Originally posted by crptcblade
Not all at once, no. But you could loop through and bold each part as you hit them.
so maybe do a for next loop like

VB Code:
  1. Dim i As Integer
  2. For i = 1 To Len(rtf1.Text)
  3.  
  4.  
  5. Next i


Wow... its been a long time since I've been here, and about the same amount of time since I've touched VB. I was at first thinking of using left$ or right$ to see if the character at position i equals whatever is in texthighl.text, but then I realized that those took all the characters left or right of position i. Then I thought i could use instr to find out if the character between i and i+len(texthighl.text) was what was in texthighl.text, but I can't seem to do that either. I am absolutely lost at the moment.

I tried to do "rtf1.Text = Replace(rtf1.Text, texthighl.text, "{\b" & texthighl.text & "\b0}")" thinking that I could just replace the characters with their bold equivalent in RTF code, but that doesn't work either, it just types out {\b.... in the box.


Wow, I figured this would be easy too...