Forcing execution of an event....

A

Atlas

Hy there,
I wrote a very simple macro to automate printing of a document and as the
"Manual Duplex" printing option isn't working properly, I'd like to handle
with VBA everything.

So what I did is to issue 2 Application.PrintOut calls, separated by a
msgbox call.

Unfortunatelly, the print doesn't begin until the sub is exited....

Any clue on how to execute immediately the first Application.PrintOut call?

Thanks



Here's the code:

Sub PrintDuplex()

Call SetPrinterProperty(DM_PAPERSIZE, DMPAPER_A3)
Call SetPrinterProperty(DM_PRINTQUALITY, 1200)

ActivePrinter = "\\ACRUX\Kyocera Mita KM-1650 (KPDL)"

Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="4,1", PageType:= _
wdPrintAllPages, ManualDuplexPrint:=False, Collate:=True,
Background:= _
True, PrintToFile:=False, PrintZoomColumn:=2, PrintZoomRow:=1, _
PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0



MsgBox "Turn paper sheet and press Ok when ready", vbOKOnly

Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="2,3", PageType:= _
wdPrintAllPages, ManualDuplexPrint:=False, Collate:=True,
Background:= _
True, PrintToFile:=False, PrintZoomColumn:=2, PrintZoomRow:=1, _
PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0

End Sub
 
J

Jonathan West

Atlas said:
Hy there,
I wrote a very simple macro to automate printing of a document and as the
"Manual Duplex" printing option isn't working properly, I'd like to handle
with VBA everything.

So what I did is to issue 2 Application.PrintOut calls, separated by a
msgbox call.

Unfortunatelly, the print doesn't begin until the sub is exited....

Any clue on how to execute immediately the first Application.PrintOut
call?

set Background:=False in the printout method
 

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