try this:
VB Code:
  1. RichTextBox1.SaveFile (App.Path & "\datafile.txt"), rtftext

EDIT: my bad, forgot to set the flag!!