Data for Mailomerge
Posted on 2012-09-08
We are an academy and I want to create a mail merge in Word and then send this via Outlook. However, I first need to format my data into a meaningful way. I am connecting to a remote SQL server databse.
This is where I have my problem.
I want to send a message to all my parents asking them to confirm the information I have on them.
The first bit is easy, I connect to’ tbl_Parents’ where I have their <<Name>>, <<Address>>, <<Email>> etc. If this was all I would simply loop through these and that would be it. However, I also now need to list their children and their date of birth etc. That means for each parental account I need to open ‘tbl_Students’ and collect an array of all the students which match the parental account unique ID.
The last bit I do not seem to be able to do in Word. Is this possible.