Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenating two Rich Text Editors

Status
Not open for further replies.

ndalli

Programmer
Nov 6, 1999
76
0
0
MT
Hi,

I am trying to include the formatted text existing in a Rich Text Editor (say RTE2) into another say (RTE1) which also contains formatted text.

When performing the command RTE1.Text = RTE1.Text & RTE2.Text. All text will be copied but the formatting is lost.

On the otherhand when I use the command RTE1.TextRTF = RTE1.TextRTF & RTE2.TextRTF. The contents
of RTE1.TextRTF will also disappear.

Can any one please help?

Many thanks in advance
 


Yes, but then when I tried to do it through the 'Sendkeys' statement, the text is not being pasted in the Rich Text Box.
 

Give this a try...(This example uses two RTB's and a command button)
[tt]
Option Explicit

Private Sub Command1_Click()

RTB1.SelStart = 0
RTB1.SelLength = Len(RTB1.Text)
RTB1.SelBold = True

RTB2.SelStart = Len(RTB2.Text)
RTB2.SelText = vbNewLine

RTB2.SelRTF = RTB1.SelRTF

End Sub
[/tt]

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top