Improve company productivity with a Business Account.Sign Up
Dim wdOutputName As String
Dim wdInputName As Document
Dim x As Integer
Const wdDefaultLastRecord = 10 '(set last record)
wdOutputName = ThisDocument.Path & "\MyForm2.docx"
Set wdInputName = Application.ActiveDocument
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
.LastRecord = wdInputName.MailMerge.DataSource.RecordCount
' show and save output file
Application.Visible = True
Set wdDoc = Nothing
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!