VBA Printing Issue

R

RacinMyLancer

I'll try to be brief... I have a small VBA program that divides a print job
into several "chunks". Example:

10 Page Document:

Print pages 1-3 Stapled and three-hole punched
Print pages 4-8 Stapled
Print pages 9-10 Standard

The entire document is printed from the same printer, which has four drivers
set up for the various print capabilities (eg. "Panasonic DP-6010 Stapled",
"Panasonic DP-6010 Stapled and Three-Hole Punched", etc.).

PROBLEM: It seems that my program sends all the print jobs to the Spooler,
which from there sends them to the printer in random order, so I end up with
jumbled docs (pages 4-8 come before pages 1-3, etc. etc.). I need to find a
way to tell my printer (or spooler) to print in the order that I send the
docs.

I've tried putting delays in my code between the seperate print jobs that I
send, but my VBA program waits 'til the end of the entire routine to send the
jobs from the Spooler to the Printer (argh!!! why does this happen!!!), from
which point it looks like it sends them in completely arbitrary order.

Can anyone suggest to me how I might get my print order issue sorted out?
 
J

Jezebel

Not sure that this will solve your problem, but if you display the printer
properties dialog and go to the Advanced tab, there are settings controlling
how print jobs are spooled and sent to the printer. Amongst other things,
you can bypass the spooler and printer directly to the printer.
 
D

Doug Robbins

Maybe you need to set Background Printing to false so that the balance of
the code does not run until after each print job is finished.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
R

RacinMyLancer

Thank you both for your responses!

For the benefit of other users, I solved this particular issue by turning
off all "spool" options and printing directly to the printer, as Jezebel
suggested. Even with background printing set to "False", the code seemed to
want to execute completely and/or the spooler seemed to want to collect all
the print jobs before sending them to the printer. It looked like an issue
external to VBA and Word.
 

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