I try to using SuperMerge to create MailMerge document, in a document that dont use bands how can I loop for any record in a DataBase to create many letters ?
SuperMerge without a Band
-
-
- Offizieller Beitrag
Hi,
There is now a method which converts such a document into a report.
http://www.wpcubed.com/manuals/wp5man…ntotemplate.htmThis might be useful for this.
Julian
-
I unlike to use Bands header/footer only text for a clean user letter,
I do this, is it a good solution ?while not DataSource1.DataSet.EOF
do begin
WPSuperMerge1.Execute;
if i>0 then // SUBSEQUENT RUNS
begin
EditorMerge.FastSetPageBreak(true, true);
end;
Application.ProcessMessages;
DataSource1.DataSet.Next;
inc(i);
end;
EditorPrevia.FastAppendText(EditorMerge, false); -
Of course
WPSuperMerge1.SetSourceDest(Editor.Memo.RTFData,
EditorMerge.Memo.RTFData); -
- Offizieller Beitrag
Hi,
>>I unlike to use Bands header/footer only text for a clean user letter, <<
In this case don't use WPSuperMerge. Simply attach an event to WPRichText.OnMailMergeGetText. For each record call WPRichText.MergeText and use FastAppendText to copy the letter to the destination.
See demo Tasks\MailM4
Julian
-
ok, I like to create only one method to use with MailMerge or Report, than I try to use in this case SuperMeger, but how can I test if a rtf file have a band inside.
Other question is, how can I save more information inside a RTF file, like some information about data source, kind of data source, path of data source.. so so..Thanks.
-
- Offizieller Beitrag
Hi,
>> ok, I like to create only one method to use with MailMerge or Report, than I try to use in this case SuperMeger, but how can I test if a rtf file have a band inside. <<
WPSuperMerge1.Bands.Count should be >0 in this case
>>Other question is, how can I save more information inside a RTF file, like some information about data source, kind of data source, path of data source.. so so.. <<
You can use the RTFVariables for this. This is a collection of strings which will be saved with the document.
Julian
-
Thanks for while..