Or if you wanted to do it the long way you could go like this, and save it into the desktop (at which you could do anyways with Voltes code ) bbbuuuttt just in case you need something elses text saved:
[VB]
Dim strSPath As String = System.Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) & "/TheName.html"
Dim HTMLFILE As System.IO.StreamWriter = New System.IO.StreamWriter(strSPath)
HTMLFILE.Write(TextBox1.Text)
HTMLFILE.Flush() Its always good to flush and close a stream
HTMLFILE.Close()
[/VB]
no need to use the streamwriter with the richtextbox really though , as voltface was saying use .SaveFile , adding to that you can specify the format of the text to save , eg:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.