This solution is a bit easier (not tested):
dim tmpTXT as string
tmpTXT = ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Text
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Text = Left(tmpTXT, len(tmpTXT) -1)
You could do something similar earlier, before you write text to your shape which would be better.