Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

macro for Word - printing duplex 1

Status
Not open for further replies.

pendle666

Technical User
Jan 30, 2003
295
GB
Hi

I've got several macros which controls the printing of various types of documents our secretaries produce in Word.

Until now, none of the printers were duplex, so my printing macro referred to tray "Manual Feed" for duplex.

Now we have got a duplex printer. I recorded a macro in Word following the procedure I wanted, and although the doc printed duplex, the code doesn't appear in the VB window.

Is there any way I can force the duplex tickbox in the printer properties window to 'true' in VB?

Thanks
 
Someone else may speak up and prove me wrong, but I don't think Duplex is a Word setting. Rather, it's a printer-specific setting that only appears in the printer options if that printer is capable of printing duplex.

As such, your best bet is probably to set that printers defaults so that Duplex is the default. I don't know that you can access that with VBA.

Anybody else know differently?

VBAjedi [swords]
 
see
another option (easy one but will always work)
First you must have two printers defined in your control panel, each one with a different configuration, and with a significant name (recommended), for example :

"HP LaserJet 4 local on LPT1: (NORMAL)" with duplex disabled
"HP LaserJet 4 local on LPT1: (DUPLEX)" with duplex enabled


then you make this sample code :

Sub Test()
Application.ActivePrinter = "HP LaserJet 4 local on LPT1: (DUPLEX)"

'print your document here

Application.ActivePrinter = "HP LaserJet 4 local on LPT1: (NORMAL)"
End Sub

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top