For some reason when I run the macro below, a print job is also generated that contains ALL the pages of the document. I would like to prevent that from happening.
BACKGROUND. I have a VBA macro to print exams after a mail merge. In this example the document has 5 sections. This macro breaks the merged doc into individual print jobs for the printer so each can be individually stapled. The macro works fine. EXCEPT it also generates an unwanted job that contains all the pages of the document. Any help to explain why that happens (and prevent it) will be appreciated. Because I am printing 60 eight-page docs, the time it takes to generate the unwanted 480 page doc is aggravating.
SYSTEM: Win7-64, Word2010-32
My work around has been to pause the print queue until all the jobs have been created, then nuke the one with all the pages.
Thanks in advance.
--Lloyd
Sub aa_exam_print()
Dim i As Long
With ActiveDocument
For i = 1 To .Sections.Count Step 5
.PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i + 4
Next i
End With
End Sub