Mailmerge does not work

vampke

New member
Joined
Feb 15, 2008
Messages
3
Programming Experience
Beginner
Hi guys,

I have been looking for days to solve this, but I can't figure it out. (Googling taught me that I'm not the only one...)
I need my app to be able to generate a mailing in Word for 'clients'.
I am able to use a word template file and generate the result I need for 1 client, but I need it to generate the result for every client.
One solution would be to generate one file per client, but this is not practicle since there might be up to hundreds of clients.
Mail merge seems to be what I need, but the example on the microsoft site (How to automate Word to perform a mail merge from Visual Basic .NET) does not work! I get the error
the requested member of the collection does not exist
on line
VB.NET:
.Cell(Row, 2).Range.InsertAfter(Text2)
I have tried all the possible examples google would offer me, but none of them seems to be working.

Can anyone point me in the right direction?

Kind regards,

v.

edit: please also note that the input is a dataset: the result from querying a mysql db
 
Last edited:
Back
Top