Hello
With the help of forums and the Microsoft KB, I wrote a macro that selects a mergefield (eg. the column "Group"), gets his value (eg. "B2") and insert the content of the related text file (eg. "C:\B2.TXT").
My macro works well, except that the mail merge part doesn't work. It takes the value of the first line of my data source and replicates it on every record.
Here is a simplified version of my macro (of course, it would be useless if it only did that):
Sub ShowGroup
Dim GroupVal As String
GroupVal = ActiveDocument.MailMerge.DataSource.DataFields("Group").Value
Selection.TypeText (GroupVal)
End Sub
Do you have an idea of how I should correct this macro, and also when I should run it?
Thanks in advance!
Patrick