I am creating several letters in a document. The first letter looks fine but the others don't format correctly. E.g. the formatting paralCenter is lost in the first par on the second letter.
What am I missing?
wptMerge.SetSourceDest(wptSource.Memo.RTFData, wptLetter.Memo.RTFData);
wptDest.BeginUpdate;
i := 0;
while i < AddressList.Count do
begin
CurrentAddress := TAddress(AddressList.Objects[i]);
wptLetter.Clear;
wptMerge.Execute;
Section := wptDest.FastAppendText(wptLetter, true, [wpCreateNewPage]);
Section.Select := [wpsec_ResetOutlineNums, wpsec_ResetPageNumber];
Inc(i);
end;
wptDest.EndUpdate;
In some cases it is only addess that change, but in others there are lists with data from a database and that is why WPReporter is used. In the simple case it is nice to keep the template simple. So it is a mix of the example in the help file (7.5.4 FastAppendText: Create text with multiple letters) and the use of WPReporter. The problem I ran into is on the second letter and if the first paragraph is centered.
#3♥ 0
This category is archived. No new posts are possible.