-
Ok, i made a text editor and when i save a file in it adds a bunch of text like this...
{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fmodern Courier New;}{\f3\fmodern Courier New;}}
{\colortbl\red0\green0\blue0;}
\deflang1033\pard\plain\f2\fs24 gggggggggg
\par }
How do i stop this?
-
You are saving in RichTextFormat. Are you using a RichTextBox for your editor? If so, instead of saving it in RichText format, save it using ASCII text.
Code:
RichTextBox1.SaveFile("C:\MyFile", rtfText)
-
Megatron,
I cant figure it out, if i send you the code could you try for me?
-
-
This what you need.
'Make a string called FileName and input the name of the
'file for instance "C:\Windows\Mytext.txt"
'Make a RichTextBox called Text1 (or rather I guess you
'already have one...)
'Use this code:
Text1.SaveFile FileName, rtfText
'You can also write:
Text1.SaveFile "C:\Windows\Mytext.txt"
'Voila!
'This is all you need. If you omit the ", rtfText" at the
'end you'll get all the strange text at the end.
Good luck,
Pentax
-
Ok, when i save it as a text file or as a .html file it still shows up.