The problem is that your code replaces the merge field with the record read from the database. That means one of two things is going to happen:
- The text replaces the merge field itself, meaning only the data from the first record will be present; or
- The text leaves the merge field in place, meaning only the data from the last record will be present.
You can't simply select the merge field and replace it with the text you want to use. Instead you need to use a combination of
MailMerge.OpenDataSource[
^],
MailMerge.Execute[
^], and possibly other methods on the
MailMerge
property.