Here is a real basic example. Run this, click somewhere in the middle of the sentence, then click command 1. It will insert "Hello World" at the cursor position. If you had a section higlighted, it would replace the highlighted text.

Hope this gives you a start . . .

VB Code:
  1. Private Sub Form_Load()
  2.     rtb1.Text = "Forescore and seven years ago our forefathers, blah, blah, blah"
  3. End Sub
  4. Private Sub Command1_Click()
  5.     rtb1.SelText = "Hello World"
  6. End Sub