Printing envelopes with a prompt between each

bobski59
bobski59 used Ask the Experts™
on
I have a routine to print envelopes from a database using Printer Object and I am trying to make it prompt between each envelope.

The code looks something similar to this:

cdlPrint.ShowPrinter
Do Until rstRecSet.EOF
  rsp = MsgBox("Insert envelope and click OK, vbOKOnly)
  Printer.Print
  ...
  ...
  Printer.NewPage
  rstRecSet.MoveNext
Loop
Printer.EndDoc

What I get is my Message Box prompt immediately x number of times in a row (however many addresses I have to print) before any printing even starts.
How can I code it to prompt me, print one and then prompt me for the next one (without having to do something like reselect the printer each time?)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Move the Printer.EndDoc to before rstRecSet.MoveNext.

By having the Printer.EndDoc outside of your loop, you are creating a multipage print job.  What you really want to do is create a whole bunch of individual print jobs.

Chris

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial