Testing for Duplex

T

Terry

I'm trying to use the excellent article at
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116
to set up a duplex option on a vba controlled print utility.

It works very well, but what i'd like to know is if there is a way to test
whether the printer supports duplex or not?

The demo function works very well
Sub PrintDuplexBooklet()

Dim iDuplex As Long

iDuplex = GetDuplex 'save the current setting
SetDuplex 3 'set for vertical binding
ActiveDocument.PrintOut Background:=False
SetDuplex iDuplex 'restore the original setting

End SubI was hoping iDuplex = GetDuplex would return 0 if there was no
duplex option, but it doesn't.Can anyone advise?
 
J

Jonathan West

Hi Terry,

The problem here is with individual printer drivers and how they interface
with Windows.

Many inkjet printers that don't actually have a duplex option fake it by
offering a "manual duplex" mode, where commands come up on the screen to
turn the printed pages over and re-insert them into the papertray so that
the other side can be printed. That mode is triggered by setting the duplex
mode to 2 or 3 (horizonal or vertical binding).

Other printer drivers simply ignore a setting of 2 or 3, and print
single-sided anyway. In some cases, attempting to set duplex mode to 2 or 3
does nothing, and the mode remains at 1. In other cases, if you query the
mode using GetDuplex, you can get the value 2 or 3 back, but it has
absolutely no effect on the printer itself.

This is an area which is a mess in terms of programmability, and
unfortunately it isn't going to get cleared any time soon. All you can do is
get it to work according to the idiosyncracies of your particular printer.
 
T

Terry

Hmmm,
Thanks Jonathon, i was begining to come to this conclusion but was hoping
there may have been another API which would open the door for me.
Oh well, back to the drawing board!
Many thanks for replying.

Terry
 

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