The bookmarks for each row are Test1, Test2...Test7 and the applicable code look like this:
CODE
Set objWord = CreateObject ("Word.Application")
With objWord
.Documents.Add ("\\Svr-Db\Sub\{name of template")
.visible = true
.ActiveDocument.Bookmarks ("Test1").Select
.Selection.Text = rst1!XYZ
End With
With objWord
.Documents.Add ("\\Svr-Db\Sub\{name of template")
.visible = true
.ActiveDocument.Bookmarks ("Test1").Select
.Selection.Text = rst1!XYZ
End With
Works fine for the first record, but I'd like to loop through the recordset and have the above code increment by one on each pass:
CODE
.ActiveDocument.Bookmarks ("Test2").Select
.Selection.Text = rst1!XYZ
THEN
.ActiveDocument.Bookmarks ("Test3").Select
.Selection.Text = rst1!XYZ
THEN ...
.Selection.Text = rst1!XYZ
THEN
.ActiveDocument.Bookmarks ("Test3").Select
.Selection.Text = rst1!XYZ
THEN ...
Is there a way to do this?