WPTools v4.20
Printing after mailmerge creates 2 copies instead of 1. Below is the code to implement mailmerge.
Code
aSource.LockScreen;
try
aOutput.LockScreen;
try
aOutput.FastCopyProperties(aSource);
aOutput.FastSetPageBreak(True);
aOutput.FastAppendtext(aSource);
aOutput.FastMergeText;
finally
aOutput.Refresh;
aOutput.UnLockScreen(True);
end;
finally
aSource.UnlockScreen(True);
end;
aOutput.Print;
Alles anzeigen