Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Copy and Paste

Posted on 2003-03-20
6
Medium Priority
?
205 Views
Last Modified: 2010-05-01
Hi everyone, I have a rich text box and I'm using this to copy the formated text:

    Clipboard.SetText rtb1.TextRTF, vbCFRTF
the problem is when I past, all rtf codes come up!
I'm using:
rtb1.SelRTF = Clipboard.GetText

how do I do this?
0
Comment
Question by:igfp
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:trkcorp
ID: 8176907
try on 2cd line:
rtb1.TextRTF = Clipboard.GetText(vbCFRTF)
0
 
LVL 4

Expert Comment

by:trkcorp
ID: 8176958
OR
rtb1.SelText = Clipboard.GetText(vbCFRTF)
0
 

Author Comment

by:igfp
ID: 8177332
yep it works but i've got another prob now. When I press CTRL + V it gives me the formated text but twice! It shows twice.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Expert Comment

by:cyberknet
ID: 8177560
be sure to clear the clipboard before you place any data on it. If you don't you run the risk of very strange things happening.
0
 
LVL 4

Accepted Solution

by:
trkcorp earned 80 total points
ID: 8180949
cyberknet is right.  Do a Clipboard.Clear before storing anything, otherwise you will append.
0
 

Author Comment

by:igfp
ID: 8183665
Thank you both, it works fine now, both functions!!! Points go to him for he helped the first one!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question