Hi Julian,
When using the code below to insert mergefields following will happen:
The first field will be inserted as expected into the WPRichText.
The next field however won't be inserted although the code for inserting is executed.
If I press the enter-key (after inserting the first field, the second field will be inserted normally.
if lbVeldenLijst.ItemIndex < 0 then ShowMessage('Selecteer a.u.b. eerst een samenvoegveld in de lijst!') else MailingEditor.InputMergeField(lbVeldenLijst.Items[lbVeldenLijst.ItemIndex]);
I got the code from the "MailM4"-project in the demo folder. It seems the second mergefield is inserted within the first mergefield and therefor omitted/lost.
Also implementing the changes in WPCtrMemo made no difference.
See: [](http://wpcubed.com/forum/viewtopic.php?t=3358)
For the first inserted mergefield the code is executed
if (spar <nil>= spar.CharCount) then sposinpar := spar.CharCount - 1;
But for the second inserted mergefield the code below isn't executed.
sposinpar := spar.CharCount - 1;
Can you please tell me how to resolve this behaviour?
Regards,
Stef