Sub MailmergeLetter()
Dim myLetter As Document
Documents.Open FileName:="C:\Letter.doc"
Set myLetter = Documents("Letter.doc")
myLetter.MailMerge.OpenDataSource Name:="C:\mydb.mdb", Connection:="TABLE Employees"
With myLetter.MailMerge
.Destination = wdSendToNewDocument
With .DataSource
.FirstRecord = 1
.LastRecord = 3
End With
.Execute
End With
End Sub
|