By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,806 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,806 IT Pros & Developers. It's quick & easy.

save a text from rich text box

P: 17
hellow
how can i do the following job
i am using rich text box 6.0
i write something in the rich text box
how can i save the file in disk as a text document
which can easily open by any text box editor
I use common dialog 6.0
Mar 18 '07 #1
Share this Question
Share on Google+
6 Replies


Expert 5K+
P: 8,434
how can i do the following job
i am using rich text box 6.0
i write something in the rich text box
how can i save the file in disk as a text document
which can easily open by any text box editor
I use common dialog 6.0
Check out the .SaveFile method on the RTB control. It allows you to specify file type.
Mar 19 '07 #2

P: 17
Check out the .SaveFile method on the RTB control. It allows you to specify file type.
I use your suggestion but still the problem is not solved
I use the following command

Private Sub mnusave_Click()
cd.ShowSave
Form1.Caption = cd.FileName
rtb.SaveFile Form1.Caption
End Sub
Here rtb stand for rich text box & cd stands for common dialog

the following is save in file where I type just "this is a test page "

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl {\f0\fnil\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17 this is a test page
\par }
Mar 19 '07 #3

Expert 5K+
P: 8,434
You didn't put in the second parameter on the SaveFile.
Mar 19 '07 #4

100+
P: 149
hellow
how can i do the following job
i am using rich text box 6.0
i write something in the rich text box
how can i save the file in disk as a text document
which can easily open by any text box editor
I use common dialog 6.0
Hi ,

Do this

RichTextBox1.SaveFile "YourFileName", rtfText

thanks
ansuman
www.mindfiresolutions.com
Mar 19 '07 #5

debasisdas
Expert 5K+
P: 8,127
thanx ansu for the advice
hope his problem is solved.
Mar 21 '07 #6

P: 17
Hi ,

Do this

RichTextBox1.SaveFile "YourFileName", rtfText

thanks
ansuman
www.mindfiresolutions.com

the problem solved

Thanks
Mar 22 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.