A
Abraet
I am using COM through Lotus Notes to read in a txt file and then use a
template and mail merge to create Word Letters. These letters will then be
electronically mailed, faxed or USPS mailed depending on the recepient's
preference (kept in a separate file). I have the mail merge part sorta
working, but only if I create separate input files for each letter. What I
want, however, is a one file to many file relationship. That is my text file
has many records that I want to produce separate Word files.
Here's a copy of my code. Any ideas??
MSWord.Documents.Open(SmartMasterDirectory + TemplateName$)
With MSWord.ActiveDocument.MailMerge
.OpenDataSource(PathName$ + fileName$)
.Destination = 0
.Execute
End With
'Save Merged document with file name
Call MSWord.ActiveDocument.SaveAs (AgentLetterDirectory + Left$(fileName$,
Instr(fileName$,"."
Annette
template and mail merge to create Word Letters. These letters will then be
electronically mailed, faxed or USPS mailed depending on the recepient's
preference (kept in a separate file). I have the mail merge part sorta
working, but only if I create separate input files for each letter. What I
want, however, is a one file to many file relationship. That is my text file
has many records that I want to produce separate Word files.
Here's a copy of my code. Any ideas??
MSWord.Documents.Open(SmartMasterDirectory + TemplateName$)
With MSWord.ActiveDocument.MailMerge
.OpenDataSource(PathName$ + fileName$)
.Destination = 0
.Execute
End With
'Save Merged document with file name
Call MSWord.ActiveDocument.SaveAs (AgentLetterDirectory + Left$(fileName$,
Instr(fileName$,"."
Annette