Results 1 to 1 of 1
2001-09-14, 06:46 #1
- Join Date
- Aug 2001
- Thanked 0 Times in 0 Posts
Macro to specify field delimiter (Word 97 SR2)
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?
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"
.Destination = wdSendToNewDocument
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord