Save in the RTF Format. Amongst Others (Optional)
wasn't here for a Small amount of time
Hello,
I am making a Thing which has Multiple Formats. I cannot save the Formats with TXT.
Is there any other Format and how do i Export as "Said" Format?
The Code i made already to Export is going to be here:
Code:
Private Sub SpeichernToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpeichernToolStripMenuItem.Click
SaveFileDialog1.Filter = "Textdatei(*.txt) | *.txt | Alle Endungen | *.*| RichTextDatei | *.rtf"
SaveFileDialog1.ShowDialog()
Dim Location As String
Location = SaveFileDialog1.FileName
My.Computer.FileSystem.WriteAllText(Location & ".txt", "" & ".rtf" & RichTextBox1.Text, True)
End Sub
Thanks for Answers (They are Welcome),
wowinyou
Re: Save in the RTF Format. Amongst Others (Optional)
Don't use the .Text property. That only returns the plain text. Use the .RichText property instead. That contains all the Right Text Formatting codes in it.
-tg
Re: Save in the RTF Format. Amongst Others (Optional)
It would be the Rtf property but you don't have to worry about that. The RichTextBox has its own Save File method or the like, so just call that.