Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to MAIL MERGE and PRINT each Recipient Separately

Word Mail Merge

How to MAIL MERGE and PRINT each Recipient Separately

by  SkipVought  Posted    (Edited  )
You already have your Mail Merge document configured with a valid Data Source. Now you want to print each recipient separately.

Here's the concept, for purposes of understanding how it's done:
The View Merged Data button on the Mail Merge Toolbar, toggles the MergeFields to display the DATA or the FIELD NAME. You want to display the DATA.

You have the first record's data displayed in your document.

Now hit the Next Record button on the Mail Merge Toolbar.

You have the second record's data displayed in your document. Get the picture?

Here's all you have to do:

[red]
DO NOT PERFORM THE MAIL MERGE YOURSELF.[/red]
This code does the merge record by record.

Copy this code and paste into the ThisDocument code window. alt+F11 toggles between the document and the VB Editor.

Tools>Macro>Macros - Select PrintEachRecipient and RUN

Code:
Sub PrintEachRecipient()
    Dim i As Integer
'
    With ActiveDocument.MailMerge
        'SHOW ME THE DATA, rather than the merge codes
        .ViewMailMergeFieldCodes = False

        For i = 1 To .DataSource.RecordCount
            ActiveDocument.PrintOut
            .DataSource.ActiveRecord = wdNextRecord
        Next
    End With
End Sub
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top