RichTextBox Operations
How to save the data from RichTextBox into the '.txt' or any other type of file, if the input to the RichTextBox is from another controls that are bounded to the database.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
FroglegPosted Apr 9, 2011, 6:40 PM
Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
RichTextBox1.SaveFile("text.rtf")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
RichTextBox1.SaveFile("text.txt", RichTextBoxStreamType.PlainText)
End Sub
End Class