J
Jeroen
Somehow the mailmerge processes only 2 records when I use
MailMergeBeforeRecordMerge event. In my main document I've got two tables
with each a bookmark. In the MailMergeBeforeRecordMerge event I want to
populate this tables with data:
lstraFields = Split(lstrInvalidDoc, "||")
For lnIndexFields = 0 To UBound(lstraFields)
lstrField = lstraFields(lnIndexFields)
With doc.Bookmarks(pstrTableName).Range.Tables(1)
.Cell(.Rows.Count, lnIndex).Range = lstrField
End With
Next
But somehow due to this insertion of the cell the mailmerge stops after two
records. If I remove the insertion of the cell and then loop through the code
with breakpoints, all records are processed.
Any ideas?
Kind regards,
Jeroen Walstra
MailMergeBeforeRecordMerge event. In my main document I've got two tables
with each a bookmark. In the MailMergeBeforeRecordMerge event I want to
populate this tables with data:
lstraFields = Split(lstrInvalidDoc, "||")
For lnIndexFields = 0 To UBound(lstraFields)
lstrField = lstraFields(lnIndexFields)
With doc.Bookmarks(pstrTableName).Range.Tables(1)
.Cell(.Rows.Count, lnIndex).Range = lstrField
End With
Next
But somehow due to this insertion of the cell the mailmerge stops after two
records. If I remove the insertion of the cell and then loop through the code
with breakpoints, all records are processed.
Any ideas?
Kind regards,
Jeroen Walstra