why don't you simply insert
strInsertBefore
and
strInsertAfter
at the right places
textBox4.Text = textBox4.Text.Insert(textBox4.SelectionStart, strInsertBefore );
textBox4.Text = textBox4.Text.Insert(textBox4.SelectionStart + textBox4.SelectionLength + strInsertBefore.Length, strInsertAfter);
thing is untested code, you will need to adjust the index for the second one as needed.