printing certain records

P

Pam

I have a mail merge document that I only want to print
every 5th record. Can I select every 5th record before I
merge, or can I print every 5th record once I have
completed the merge?
 
D

Doug Robbins - Word MVP

Hi Pam,

The following macro should printout every 5th record of the document created
by the merge

Dim i As Integer, printrange As String
printrange = ""
For i = 1 To ActiveDocument.Sections.Count Step 5
printrange = printrange & ", s" & i
Next
printrange = Mid(printrange, 3)
ActiveDocument.PrintOut Range:=wdPrintFromTo, From:=printrange

Alternatively, if you put 4 Next Record fields at the end of the mailmerge
main document, it would skip the necessary records.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top