TWPRichText field traversal

  • Hi,

    I need to traverse through all the mergefields in the text in my TWPRichText to change some of the field texts.
    Is there any way I can do that? I can only find TWPRichText.GetFields, which gives me a readout of the existing field texts, but doesn't allow me to change anything. I was hoping for something like:

    for I := 0 to WPRichText1.Fields.Count - 1 do
    WPRichText1.Fields[I].Text := 'blablabla';

    Regards,
    Bas

  • My post was unclear. I do NOT want to merge, I want to change the text of the merge fields, not replace them.

    The fields in my rtf form look like this:

    {\field{\*\fldinst{MERGEFIELD Banner;decimals=.,0 }} \plain\f2\fs20\cf0\i <Kopje>}

    I use the field code "Banner;decimals=.,0" to format the text during mailmerge. This works fine.

    But, when loading a form. I want to be able to update the displayed text "<Kopje>". Banner is the fieldname in the database, 'kopje' is a translation of that and when the user switches languages, 'kopje' needs to be retranslated.

    Is there any way of doing this?

    Regards,
    Bas