I am using a text file as my data source and would like to automate the merge procedure. I recorded a macro to select the header source and data source. When I play it, it prompts me to select the field and record delimiters for the data source. What else do I need to add to the codes below in order for me to set the field and record delimiters so I don't have to see the dialog box when the macro is played.

Also, is there a way to perform a merge using the macro w/o opening the form letter?

<pre>Sub Merge_Print()
Dim aPath As String
Dim aFormFile As String
Dim aHeaderSource As String
Dim aDataSource As String
aPath = "Cocs"
aFormFile = aPath & "Letter5B.doc"
aHeaderSource = aPath & "Header.doc"
aDataSource = aPath & "Data.dat"

Documents.Open FileName:=aFormFile
With ActiveDocument.MailMerge
.OpenHeaderSource Name:=aHeaderSource
.OpenDataSource Name:=aDataSource
.Destination = wdSendToNewDocument
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
End Sub