RTF and MailMerge
I have a situation where I want to be able to put RTF codes into a field
that will then be used as a mail merge field in a report.
When I do something similar to this:
FieldByName('stringfield').AsString := '\b Bold Portion:\b0' + #9 +
'Unbolded portion';
the MailMerge field when the report is run gets displayed as:
\b Bold Portion:\b0 Unbolded portion
Is there a way I can get the RTF control to render the RTF after the merge
fields have been merged so I can get output as follows:
*Bold Portion:* Unbolded portion
where the part between the *'s is bold text?
that will then be used as a mail merge field in a report.
When I do something similar to this:
FieldByName('stringfield').AsString := '\b Bold Portion:\b0' + #9 +
'Unbolded portion';
the MailMerge field when the report is run gets displayed as:
\b Bold Portion:\b0 Unbolded portion
Is there a way I can get the RTF control to render the RTF after the merge
fields have been merged so I can get output as follows:
*Bold Portion:* Unbolded portion
where the part between the *'s is bold text?
This discussion has been closed.
Comments
Infopower 4000.0.4 wwRichEdit embedded as the RichText component in the
RBuilder report designer.
Sorry, for some reason my news reader missed your original message. At
run-time you can programmatically edit and manipulate the formatted text by
using the Paragraph, SelAttributes, SelStart, SelLength, and SelText
properties and the ClearSelection, FindText, and SelectAll methods. These
are the same properties and methods associated with Delphi's TRichEdit
control. You will want to use these properties to change the format of the
richtext rather than directly inserting the tags into the plain text.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com