H-SC
asked on
Concat 5 RichTextBoxes
I have a form that has 5 RichTextboxes on it, that I would like to concatinate into a final main.RichTextBox how can this be done?
so far I have the following that will not work
main.SelectionStart = Len(main.Text)
emailbody1.SelectionStart = Len(emailbody1.Text)
emailbody2.SelectionStart = Len(emailbody2.Text)
emailbody3.SelectionStart = Len(emailbody3.Text)
emailbody4.SelectionStart = Len(emailbody4.Text)
emailbody5.SelectionStart = Len(emailbody5.Text)
main.SelectedRtf = emailbody1.Rtf &
emailbody2.Rtf &
emailbody3.Rtf &
emailbody4.Rtf &
emailbody5.Rtf
so far I have the following that will not work
main.SelectionStart = Len(main.Text)
emailbody1.SelectionStart = Len(emailbody1.Text)
emailbody2.SelectionStart = Len(emailbody2.Text)
emailbody3.SelectionStart = Len(emailbody3.Text)
emailbody4.SelectionStart = Len(emailbody4.Text)
emailbody5.SelectionStart = Len(emailbody5.Text)
main.SelectedRtf = emailbody1.Rtf &
emailbody2.Rtf &
emailbody3.Rtf &
emailbody4.Rtf &
emailbody5.Rtf
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
jppinto,
That was the first thing that I coded assuming that it would work and compiled it that way, and it even works without any errors. But it drops all of the
emailbody1, 2, 3, 4, 5 formatting when it populates my Main.RichTextBox
That was the first thing that I coded assuming that it would work and compiled it that way, and it even works without any errors. But it drops all of the
emailbody1, 2, 3, 4, 5 formatting when it populates my Main.RichTextBox
ASKER
Erick37,
wow!
you are getting all of my points today!
works perfect!
thank you
wow!
you are getting all of my points today!
works perfect!
thank you
ASKER
Erick37,
One quick question...If I didn't need each on a new line, just back to back, can that be done??
One quick question...If I didn't need each on a new line, just back to back, can that be done??
main.SelectedRtf.Multiline = false
main.SelectedRtf = emailbody1.Rtf
main.SelectedRtf = emailbody2.Rtf
main.SelectedRtf = emailbody3.Rtf
main.SelectedRtf.Multiline = true
main.SelectedRtf = emailbody1.Rtf
main.SelectedRtf = emailbody2.Rtf
main.SelectedRtf = emailbody3.Rtf
main.SelectedRtf.Multiline
main.Text= emailbody1.Text & emailbody2.Text & emailbody3.Text & emailbody4.Text & emailbody5.Text
(not tested!)
jppinto