1) With "{$DEFINE WPTOOLS_MAILMERGE}" set disabled the mailmerge of "<field>" didn't work.
in TppCustomWPTRichText.MergeDBFields I added these rows to mantain the correct text format and to delete field tags when value is blank
sfValue := lDataPipeline.GetFieldAsString(lFieldName);----> Cursor.GetCharAttr;----> if sfValue <> '' then FPaintEngine.Memo.InputString(sfValue)----> else----> FPaintEngine.Memo.Cursor.ClearSelection(true, false, false);
----------------------------------------------------------------------------
2) I overrided LoadWPTRichText in TppWPTRichText class to fix mailmerge (before my intervention the text shown was the same in all records)
this is my code implementation:
procedure TppWPTRichText.LoadWPTRichText;
begin
if Printing then
begin
if FMailMerge then
begin
if OrigText = '' then
OrigText := RichText
else
RichText := OrigText;
end;
end;
inherited LoadWPTRichText;
end;
Alles anzeigen
----------------------------------------------------------------------------
3) The TppWPTRichText.edit metoth displays an editor (TWPToolsEditor) that does not allow the addition of <field> selecting from a list. I put the old code of rbsupport for wptools4
Please fix your code.
Best Regards
Matteo