PDA

View Full Version : duplex printing



JayM
08-17-2006, 02:58 AM
I know this has probably been asked many times before but I am a bit of a simpleton when it comes to this duplex printing lark. I have looked at Jonathan West's articles on controlling a printer but frankly I am a bit lost with it all.

I have created some macros that print to different paper trays for our printers. Mostly HP PCL 5e/6 drivers the macros I am using work for all the different printer types we have at the moment 4000 - 4100.

What I would like to be able to do is to set some macros to print duplex as well.

My current macro looks something like this :

Sub PRINT_THIN_P()
' PRINT_THIN_P Macro
UNPROTECTDOCUMENT
With ActiveDocument.PageSetup
.FirstPageTray = wdPrinterPaperCassette
.OtherPagesTray = wdPrinterPaperCassette
End With
Application.PrintOut filename:="", Range:=wdPrintAllDocument, Item:=wdPrintDocumentContent, _
Copies:=1, Pages:="", PageType:=wdPrintAllPages, Collate:=True, _
Background:=True, PrintToFile:=False
REPROTECTDOCUMENT
End Sub

The UNPROTECT/REPROTECTDOCUMENT just checks to see if it is a protected form and unlocks it for printing and then protects it again after printing.
(Thanks to help from DebsP)

How can I add duplex printing to this. I suppose I should explain that this is for some 100+ users over three sites using different printers.

If you need any more info from me please shout. I would be everso grateful for any help on this matter.

JayM

TonyJollans
08-17-2006, 11:58 AM
AFAIK, duplex printing is a printer option that cannot be set using any Word facility. You have to address the printer directly and I guess that's what Jonathan's articles do.

It isn't easy. From what I remember (and I haven't done this for a while) you need to get hold of printer control blocks and manipulate bit settings and, even then, it can be a bit hit and miss and needs a belt and braces job as well as arbitrary waits to make sure your changes have actually been effected. If you have seen an article that directly addresses duplexing then can you post a link to it (or to any other article you're referring to) and I'll try to help you through it.

mdmackillop
08-17-2006, 12:17 PM
The "simple" way to do this is to add another copy of your printer and name it "Duplex" on your computer. Set it up in the printer properties to do the Duplexing or whatever. Your code then just has to change the active printer, and reset it on completion. I use this method for watermarking and even stapling! For ease of use create a userform - see this example. http://www.vbaexpress.com/kb/getarticle.php?kb_id=332 You can add bells and whistles to the form as you like for Orientation, Page Selection etc (see my Excel Print KB item)

Crooz
06-20-2008, 03:29 AM
Or... you could try this:
http://support.microsoft.com/kb/230743

MOS MASTER
06-22-2008, 02:27 PM
Hi Crooz, :yes

This topic is very old but still thanks for sharing the link.

mdmackillop
06-23-2008, 05:14 AM
Great to see the moose is out of hibernation!

MOS MASTER
06-23-2008, 09:51 AM
Great to see the moose is out of hibernation!
Hi Mac, :hi:

Thanks it's been a long sleep and I'm glad to see you too!