How to merge styled text of multiple text areas ?

I have a set of text areas containing styled text that should get printed. My original idea was to merge the RTFData of these text areas into a separate (invisible) one, then printing this box using the StyledTextPrinter.

For example:

TAPrintMe.StyledText.RTFData = TA1.StyledText.RTFData + TA2.StyledText.RTFData + TA3.StyledText.RTFData

stp = TAPrintMe.StyledTextPrinter(g,560) 'stp As StyledTextPrinter, g As Graphics

Unfortunately, while the text is printed, some text formatting is not correctly handled (e.g. a centered paragraph will also center the following paragraph). So I think the RTF parser has problems with such merged RTF data, because printing each single text area is working fine.

What other options do I have printing multiple text areas on one page ? Any hint is highly appreciated (please, no plug-ins or third party classes). :slight_smile:

Thank you,

Create a new STyledtext object.
Scan thru the StyleRuns in each of your other ST objects
Append them the the new object

Thanks. No way to use the RTF data ?

I don’t think there is any other way than using styleruns.

RTF isn’t meant to be concatenated like that.

I see… thanks for the hint. :slight_smile: