I have a list of 14 soccer players that get the same information on a regular basis. I set up an access database with their personal information. I also set up a standard word document with lastname and firstname, address, city, and state bookmarks. I have no problem with doing it for a single player. However, I am having a problem when preparing the same document for all. The way I had it in my mind was select a record, get the last and first names and place them at their bookmarks, print it out and then do the same for the next 13 records. However, it is not. Any suggestions why. Thanks in advance.
Dim objword As Word.Application
Dim db As Database
Dim rsdata As DAO.Recordset
Set db = CurrentDb
Set rsdata = db.OpenRecordset("SELECT lastname from tblplayers")
Set objword = New Word.Application
objword.Visible = True
objword.Documents.Open ("mailmerge.doc")
Do While Not rsdata.EOF
objword.Selection.GoTo what:=wdGoToBookmark, _ name:="lastname"
objword.Selection.TypeText rsdata("lastname")
objword.Selection.GoTo what:=wdGoToBookmark, _ Name:="firstname"
objword.Selection.TypeText rsdata("firstname")
objword.ActiveDocument.PrintOut
rsdata.MoveNext
Loop
Set objword = Nothing
Dim objword As Word.Application
Dim db As Database
Dim rsdata As DAO.Recordset
Set db = CurrentDb
Set rsdata = db.OpenRecordset("SELECT lastname from tblplayers")
Set objword = New Word.Application
objword.Visible = True
objword.Documents.Open ("mailmerge.doc")
Do While Not rsdata.EOF
objword.Selection.GoTo what:=wdGoToBookmark, _ name:="lastname"
objword.Selection.TypeText rsdata("lastname")
objword.Selection.GoTo what:=wdGoToBookmark, _ Name:="firstname"
objword.Selection.TypeText rsdata("firstname")
objword.ActiveDocument.PrintOut
rsdata.MoveNext
Loop
Set objword = Nothing