Merge to a new document and use only records 1 to 3 : MailMerge « Outlook « VBA / Excel / Access / Word






Merge to a new document and use only records 1 to 3

 
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

 








Related examples in the same category

1.Connecting Word with Access and MailMerge