hi,

sub :How to create mail merge fields in a word document in VB ?

i have a word document template containing some mail merge fields. In my
VB program i am opening that template and filling the fields with data( for
example name, address etc...). After that the word document will be saved
in another name. My problem is how to create a new mail merge field in the
opened word document.


example of code :

this is a skeleton of the code for filling data inside the mail merge field..

While WordApplication.ActiveDocument.MailMerge.Fields.count <> 0
WordApplication.ActiveDocument.MailMerge.Fields.item(1).Select
WordApplication.Selection.Text = gstrLetterArray(i)
Wend

Thanx in advance