Basically, I have a basic knowledge of Access and how to get around it. I know little about VB and SQL. On to the question:
I have created a database in Access that I want to be able to export each record to a seperate Word file, with a letterhead and proper arrangement.
The closest I can get is to have it fill in a template in Word using Mail merge. However, it puts them all into a 50-some page file that does me no good, since I am not printing them. I need them to be split up, each page as a file, and to be named as the first column in each record.
If anyone could show me the way or point me to any good resources, I am a quick learner, I would greatly appreciate it.
Here is some code for putting a recordset to several files. The only thing I did not do is change the filename each time. You will have to do so otherwise you willend up with one file with the last record in it.
Private Type Record
Counter As String * 300
Counter2 As String * 2
If rsTemp.RecordCount > 0 Then
While Not rsTemp.EOF
Open Filename For Random As #1 Len = Len(MyRecord)
MyRecord.Counter = rsTemp!Data1 & Nz(rsTemp!Data2, "")
MyRecord.Counter2 = vbCr & vbLf
Put #1, 1, MyRecord
MsgBox "There are no records.", 0, "No Data"