|
-
May 18th, 2000, 01:31 AM
#1
Thread Starter
New Member
I am using vb 6.0 Can anyone tell me if you can copy things from a richtextbox without it coping all the rich text code so that when it is pasted it only pastes the text. If you can give me the code of how to do this.
Thanks,
-
May 18th, 2000, 03:07 AM
#2
I do not quite understnad your question. Do you want to copy text from the RichTextBox and have it pasted in ASCII format? If so, the following example will work. Make a Form with a RichTextBox, TextBox and a CommandButton.
Code:
Private Sub Command1_Click()
ClipBoard.SetText(RichTextBox1.Text)
' If you want to copy it in RichTextFormat, you could use
'ClipBoard.SetText(RichTextBox1.TextRTF, vbCFRTF)
End Sub
-
May 18th, 2000, 10:20 AM
#3
Conquistador
try this also:
Code:
Clipboard.SetText rtf1.TextRTF, vbCFRTF
Clipboard.SetText rtf1.Text, vbCFText
then if the application which uses paste next, dosn't support rtf it will paste normal text, instead of the other weird code. but if it does like microosft word it will paste as rtf
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|