I have four print statements in my VBA code each of which requires that
different paper be loaded in the printer. This means I have to stop the code
from running until the current printing is finished. When the current
printing is finished I need to load new paper and then restart the code. How
do I use VBA to pause the code but keep the printer going until it finishes
its current job? I have tried MsgBox but this stops both the code and printer.
--
Bob Collin

Re: How pause code but keep printer running? by Jay

Jay
Sun Oct 01 12:25:33 CDT 2006

In each ActiveDocument.PrintOut statement, set Background:=False. That
makes VBA block (stop processing more VBA statements) until the print
job has been sent to the spooler (or to the printer, if spooling is
disabled). Then the next statement should be a MsgBox telling the
operator to change the paper and click OK when ready.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 1 Oct 2006 08:19:01 -0700, Bob Collin
<bobcollin@discussions.microsoft.com> wrote:

>I have four print statements in my VBA code each of which requires that
>different paper be loaded in the printer. This means I have to stop the code
>from running until the current printing is finished. When the current
>printing is finished I need to load new paper and then restart the code. How
>do I use VBA to pause the code but keep the printer going until it finishes
>its current job? I have tried MsgBox but this stops both the code and printer.

Re: How pause code but keep printer running? by bobcollin

bobcollin
Sun Oct 01 14:20:01 CDT 2006

Jay,
Many thanks. Your answer was just what I needed.
--
Bob Collin


"Jay Freedman" wrote:

> In each ActiveDocument.PrintOut statement, set Background:=False. That
> makes VBA block (stop processing more VBA statements) until the print
> job has been sent to the spooler (or to the printer, if spooling is
> disabled). Then the next statement should be a MsgBox telling the
> operator to change the paper and click OK when ready.
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.
>
> On Sun, 1 Oct 2006 08:19:01 -0700, Bob Collin
> <bobcollin@discussions.microsoft.com> wrote:
>
> >I have four print statements in my VBA code each of which requires that
> >different paper be loaded in the printer. This means I have to stop the code
> >from running until the current printing is finished. When the current
> >printing is finished I need to load new paper and then restart the code. How
> >do I use VBA to pause the code but keep the printer going until it finishes
> >its current job? I have tried MsgBox but this stops both the code and printer.
>